Home › Tools › URL Encoder / Decoder
🔗 Free Tool · No Signup

Free URL Encoder / Decoder

Encode or decode URLs and text instantly — component and full-URI modes, live conversion, full Unicode support.

Encode or Decode


What URL Encoding Is and Why It Exists

URLs can only safely contain a limited set of ASCII characters. Anything else — spaces, punctuation with special meaning, or non-Latin scripts — needs to be converted into a safe format called percent-encoding: a % sign followed by two hexadecimal digits representing the character's byte value. A space becomes %20, an ampersand becomes %26, and so on.

Without this, a URL containing a literal space or an unescaped & inside a value could break entirely, get truncated, or be misinterpreted by the server as a separate parameter.

🔗

Query Parameters

Encode values before appending them to a URL

📝

Form Submissions

Browsers encode form data automatically before sending

🌏

International Text

Non-Latin scripts must be encoded to travel safely in a URL

🔌

API Requests

Ensures special characters in requests aren't misinterpreted

Component vs Full URI Encoding

JavaScript (and most languages) offer two related but distinct encoding functions, matched by this tool's two modes:

encodeURIComponent — encodes everything
encodeURIComponent("a=1&b=2") → "a%3D1%26b%3D2"
encodeURI — preserves URL structure characters
encodeURI("https://example.com/a b?x=1&y=2") → "https://example.com/a%20b?x=1&y=2"
💡 Rule of thumb: encoding one value that's going into a URL → use Component. Encoding an entire URL you already have → use Full URI, so its structural : / ? & = characters survive intact.

How Non-English Characters Get Encoded

Characters outside basic ASCII — Hindi, Arabic, Chinese, emoji — are first converted to their UTF-8 byte sequence, and every individual byte is then percent-encoded. This is why a single Devanagari character often expands into two or three %XX sequences once encoded, rather than just one.

Need to encode binary data instead?

Encode or decode Base64 text and data instantly.

Open Base64 Encoder/Decoder →

Why + Sometimes Means Space Too

You'll sometimes see a + symbol representing a space instead of %20 — this is a legacy convention specific to the application/x-www-form-urlencoded format used by HTML form submissions and query strings, not a general URL rule. Outside that specific context, %20 is the universally correct choice, and this tool always uses %20 for consistency and correctness.

5 Common Encoding Mistakes to Avoid

Mistake 1 — Double-encoding an already-encoded string
Encoding "%20" again produces "%2520" — always check whether your input is already encoded before running it through the tool again.
Mistake 2 — Using Full URI mode on a single parameter value
Full URI mode won't encode & or = — if you're building one query parameter value, use Component mode so those characters get properly escaped.
Mistake 3 — Using Component mode on a complete URL
Component mode will also encode the :// and / of your URL structure, breaking it entirely — use Full URI mode for whole URLs instead.
Mistake 4 — Manually replacing spaces with + outside form contexts
+ for space is a form-encoding-specific convention — using it in a general URL path can be misinterpreted as a literal plus sign by some servers.
Mistake 5 — Assuming decoding always succeeds
Decoding malformed or truncated percent-sequences throws an error — always handle decode failures gracefully rather than assuming input is well-formed.

Frequently Asked Questions

URL encoding (percent-encoding) converts characters not allowed in a URL — like spaces, &, or non-Latin characters — into a % followed by two hex digits representing that character's byte value, such as %20 for a space.

encodeURIComponent encodes every special character including & = ? /, safe for a single value. encodeURI preserves URL structure characters and only encodes things like spaces, appropriate for a complete URL.

%20 is the standard percent-encoding for space. + is an older convention specific to URL query strings from HTML form submissions — %20 is the universally correct choice outside that context.

Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded — a single Devanagari character often becomes multiple %XX sequences.

Decoding fails when the percent-sequence doesn't form valid UTF-8 bytes — usually an incomplete %XX sequence or a stray % not followed by two valid hex digits, meaning the input wasn't properly encoded.

Use component encoding for a single value going into a URL, like a query parameter. Use full URI encoding for an entire URL where you want to preserve its structural characters.

No. All encoding and decoding happens instantly inside your browser using native JavaScript functions. Nothing you type is uploaded, logged, or stored on any server.

More Free Tools on ToolLoom

📅 August 2026 · Written by the ToolLoom Team · Reviewed for accuracy August 2026. Found an error? Email contact@toolloom.in