URL Encoder
Type or paste text above to convert it.
URL Encoder converts text to and from percent encoding, the format browsers and servers use to carry special characters inside a URL. Switch between encode and decode with one control, paste your text, and copy the result. Encoding uses encodeURIComponent so reserved characters like spaces, ampersands, and slashes are escaped safely, which makes it ideal for query string values. Everything runs in your browser, so nothing you type leaves your device.
How to use
- Pick a direction: Encode to make text URL safe, or Decode to read percent encoded text.
- Type or paste your text into the Input box.
- Read the converted result in the Output box, which updates as you type.
- Press Copy to put the result on your clipboard, or Reset to start over.
- If decoding fails, check the error message for stray percent signs or incomplete sequences.
Examples
- Encode: hello world & friends becomes hello%20world%20%26%20friends
- Decode: caf%C3%A9 becomes café
- Encode a query value: a=1&b=2 becomes a%3D1%26b%3D2
FAQs
- What is the difference between encoding and decoding?
- Encoding replaces special characters with percent escapes so they survive inside a URL, for example a space becomes %20. Decoding reverses that, turning %20 back into a space so the text is readable again.
- Does this use encodeURIComponent or encodeURI?
- It uses encodeURIComponent, which escapes reserved characters such as &, =, ?, and /. That is the correct choice for a single value like a query parameter or path segment, where those characters would otherwise change the meaning of the URL.
- Why do I get an error when I try to decode?
- Decoding fails when the text is not valid percent encoding. Common causes are a lone percent sign (like 100% off) or an incomplete escape such as %A that is missing a digit. Fix or remove the stray sequence and try again.
- Are spaces encoded as %20 or as a plus sign?
- This tool encodes spaces as %20, which works everywhere in a URL. The plus sign is only treated as a space in the query part of older form submissions, so %20 is the safer, more general choice.
- Is my text sent to a server?
- No. All encoding and decoding happens locally in your browser using built in functions, so your input is never uploaded or stored.
Related tools
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.
- HTML Entity EncoderEncode special characters to HTML entities or decode them back. Handles ampersand, less than, greater than, and quotes with a direction toggle.
- Slug GeneratorTurn any title or text into a clean, lowercase URL slug. Spaces become hyphens, punctuation is stripped, and repeats are collapsed.
- JSON to CSV ConverterConvert a JSON array of flat objects into clean CSV in your browser. Header row from all keys, with safe quoting for commas, quotes, and line breaks.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- UUID GeneratorGenerate random version 4 UUIDs in your browser. Pick how many (1 to 100) and copy them in one click. Fast, private, no signup.