Predict URL Encoding
Predict Output Medium
Question
What is the percent-encoded form of the query value 'hello world'?
Code
Original: ?q=hello world
Encoded: ?q=___
Hint
Spaces are encoded as %20 in URLs.
Explanation
URLs cannot contain spaces. Percent-encoding replaces unsafe characters with % followed by their ASCII hex value. A space (ASCII 32, hex 20) becomes %20. So 'hello world' encodes to 'hello%20world'. Some systems also accept '+' for spaces in query strings.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.