ToolFlip

Free Online URL Encoder / Decoder

Encode and decode URL strings instantly with this free online URL encoder. Paste any text containing special characters — spaces, ampersands, question marks, Unicode characters — and get the properly percent-encoded version ready to use in query strings, API parameters, and form data. Switch to decode mode to convert percent-encoded strings like %20 and %26 back to readable text. The tool uses encodeURIComponent, the standard JavaScript function for encoding query parameter values, which encodes everything except letters, digits, and - _ . ~. This is the correct encoding for 95% of use cases when building URLs programmatically. Full Unicode support means emojis, CJK characters, and accented letters all encode and decode correctly. A swap button lets you move the output back to input for verification or chaining. All processing happens entirely in your browser with no data sent to any server. Whether you are debugging a malformed URL, building API request parameters, or encoding form data for submission, this tool handles it instantly.

Frequently Asked Questions

URL encoding (percent-encoding) replaces unsafe characters in URLs with a % followed by their hex code. For example, a space becomes %20 and an ampersand becomes %26. This is required for query string values, form data, and any text embedded in a URL to prevent breaking the URL structure.

Use encodeURIComponent for query parameter values — it encodes everything except letters, digits, and - _ . ~. Use encodeURI for full URLs — it preserves URL-structural characters like :, /, ?, and #. In practice, encodeURIComponent is what you want 95% of the time when building API requests.

Spaces are not valid characters in URLs. The percent-encoding standard replaces a space with %20 (the hex code for the space character, which is 0x20 or decimal 32). Some older systems use + for spaces in query strings, but %20 is the universal standard that works everywhere.

Any character that is not a letter (A-Z, a-z), digit (0-9), or one of the unreserved characters (- _ . ~) must be percent-encoded when used in a URL query parameter value. Common characters that need encoding include spaces, &, =, ?, #, /, and all Unicode characters.

No. All URL encoding and decoding happens entirely in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent functions. No data is transmitted, stored, or logged.