Home Developer Tools URL Encoder Decoder

URL Encoder Decoder - See Every Character Explained

Encode or decode any URL or text - with a live breakdown showing exactly which characters changed and why. Split full URLs into protocol, host, path, and query params. Detects double-encoding before it breaks your links.

Always Free Character breakdown URL splitter Runs in browser
Component · Full URI · Form encoding - all explained
See exactly which characters were encoded - and why
Split any URL into protocol, host, path, and query params
Detects double-encoding before it breaks your links
Input
0 chars
Output
0 chars
Type something to encode - output appears here
Character-by-character breakdown

Recent conversions

Common character reference - what does %XX mean?

Other tools give you
gibberish. This explains it.

Every encoded character is explained. Every URL can be split into its parts. Double-encoding is caught before it breaks something.

Character-by-character breakdown

Every encoded character is listed with its code and a plain-English explanation - turn %20 from gibberish into "space - not allowed in URLs".

educational, not just functional

URL component splitter

Paste any URL and see it broken into protocol, host, port, path, query, and fragment - with each query parameter shown individually.

debug real URLs

3 encoding modes explained

Component, Full URI, and Form encoding - switch between them and watch the output change, with the difference explained inline.

learn the difference

Double-encoding detection

Spots %25 sequences that suggest your text was already encoded once - and offers to decode twice with one click.

catches a real, common bug

Query string builder

Build a query string from key-value pairs - every value is encoded automatically as you type. No manual %-encoding needed.

build, don't just convert

Built-in reference table

A collapsible table of common characters and their percent-encoded forms - bookmark this page as your %XX cheat sheet.

cheat sheet included

Encode, decode, or debug a URL in seconds

Three tools in one - encoding, splitting, and building.

1

Type or paste

Enter any text or URL. The output updates live as you type - no button required for basic encoding.

2

Choose your mode

Use Component/Full URI/Form encoding for simple conversions, the URL Splitter to debug a full link, or the Query Builder to construct one from scratch.

3

Understand & copy

Review the character breakdown to understand what changed, then copy the result - or use it as input for another pass.

URL encoding - why it exists and how it actually works

A URL can only contain a limited set of characters safely: letters, digits, and a handful of punctuation marks like -, _, ., and ~. Everything else - spaces, accented letters, emoji, and characters that have special meaning in URL syntax like &, =, and ? - must be represented using percent-encoding: a % followed by two hexadecimal digits representing the character's byte value. A space becomes %20, an ampersand becomes %26, and so on.

encodeURIComponent vs encodeURI - the distinction that trips everyone up

encodeURIComponent is the right choice almost all the time. It encodes a single value - a query parameter, a path segment - and escapes everything that could be misread as URL structure, including &, =, ?, #, and /. This is essential when the value itself might contain those characters: if a search term is "rock & roll", you need the & encoded to %26 so it isn't mistaken for a parameter separator.

encodeURI is for encoding an entire, already-structured URL. It leaves the structural characters - :, /, ?, &, =, # - untouched, because removing them would break the URL. It only encodes characters like spaces and unicode characters that are definitely not part of the URL's syntax.

Rule of thumb: If you are building a URL piece by piece - encoding a search term before inserting it into ?q=... - use encodeURIComponent on each piece individually, then assemble the full URL. Never run encodeURIComponent on a complete URL - it will mangle the :// and ? that make it a valid URL in the first place.

Form encoding - the third convention

application/x-www-form-urlencoded is what browsers use by default when submitting an HTML <form>. It is nearly identical to encodeURIComponent, with one historical difference: spaces are encoded as + instead of %20. Both are valid and decode to a space, but if you're constructing a request body for an API that expects form encoding, use + for spaces to match what the server expects.

Double-encoding - a quietly common bug

Imagine a URL passes through two systems that both apply encoding. The first system encodes a space to %20. The second system, not knowing the string is already encoded, encodes the % character itself - turning %20 into %2520. When this URL is finally decoded once, it becomes %20 - still not a space. The fix is to decode it a second time. This tool detects %25 sequences (the encoded form of %) and flags the likelihood of double-encoding.

ModeFunctionSpace becomesEncodes & = ? / #
ComponentencodeURIComponent%20Yes - all of them
Full URIencodeURI%20No - preserved as structure
Formx-www-form-urlencoded+Yes - like Component

Search query parameters

Encode user search input before adding it to a URL - handle spaces, special characters, and emoji safely.

API integration

Debug why an API call fails by splitting the URL and checking each query parameter is correctly encoded.

Share links

Build properly encoded share URLs for social media, email links, or deep links into apps.

Fixing broken links

Use the double-encoding detector to find and fix links that have been encoded one too many times.

International URLs

Encode non-ASCII characters in domain names, paths, and query strings for international content.

Learning URL syntax

Use the character breakdown and reference table to understand exactly how URL encoding works.

URL encoding questions,
answered.

Everything about percent-encoding, URL structure, and common pitfalls.

Ask a question
%20 is the percent-encoded representation of a space character. URLs cannot contain literal spaces, so spaces are replaced with %20 (or sometimes + in form encoding) when a URL is encoded.
encodeURIComponent encodes a single value intended for one part of a URL - it escapes characters like &, =, ?, and / because they could otherwise be mistaken for URL structure. encodeURI encodes a complete URL and leaves those structural characters untouched so the URL remains valid. Use encodeURIComponent for query parameter values, and encodeURI only when encoding a full URL string.
application/x-www-form-urlencoded is the format browsers use when submitting HTML forms via GET or POST. It is similar to standard percent-encoding but represents spaces as + instead of %20. Use this mode if you are constructing a request body or query string for a traditional form submission.
Double-encoding happens when an already-encoded string gets encoded again - for example, a space becomes %20, and then the % itself gets encoded into %2520. This often happens accidentally when a URL passes through multiple systems that each apply encoding. The result is a URL that decodes incorrectly and may break links or API calls. This tool detects %25 sequences and warns you if double-encoding is likely.
Switch to the URL Splitter tab and paste a full URL. It breaks the URL down into protocol, host, port, path, query string, and fragment, and lists each query parameter as an individual key-value pair with its decoded value shown alongside.
A decoding error usually means the string contains a malformed percent-sequence - a % character not followed by two valid hexadecimal digits. This can happen if a literal % character in the original text was never encoded to %25. The tool highlights this in the issue banner above the input.
Reserved characters with special meaning in URL syntax - such as :/?#[]@!$&'()*+,;= - and any character outside the basic ASCII letters, digits, and -_.~ need encoding when used as data rather than structure. The reference table below the tool lists the most common characters and their encoded forms.