QREndless

URL Encoder / Decoder

Percent-encode components or normalize a full URL.

100% on-device
Mode
0 chars
Encoding Options
0 chars
Free online URL encoder and decoder converting special characters to and from percent encoding

The Best URL Encoder / Decoder

RFC 3986 Percent-Encoding

Implements standard percent-encoding via encodeURIComponent and encodeURI. Reserved and unsafe characters become %XX hex sequences safe for URLs and query strings.

100% Private

All encoding and decoding runs entirely in your browser. Your text is never uploaded, logged, or sent to any server — no signup, no tracking, no daily limit.

Live Conversion

Real-time encode/decode as you type (200ms debounce). Instantly see percent-encoded output or human-readable decoded text with live character counts.

Smart Modes

Encode entire strings, preserve URL structure (keep ://?&=# intact), switch spaces between %20 and +, and swap input↔output with one click.

How to Use It in 3 Steps

  1. Paste a URL or Text

    Feed in any URL, query string, or piece of text — accented characters, spaces, emoji, ampersands, whatever you have.

  2. Pick Encoding Options

    Encode everything (RFC 3986) or preserve URL structure (://?&=# stay readable). Choose %20 for paths or + for form-style spaces — output updates live.

  3. Copy or Flip Direction

    Copy the result, swap encode↔decode with one click, and decode anything back to human-readable text — malformed sequences are caught with a clear error.

URL Encoder / Decoder for Every Need

Query Params & APIs

Safely embed values in ?key=…&q=… parameters — spaces, ampersands, and # in user data will silently truncate a URL unless encoded.

Internationalized URLs

Turn café, 日本語, or emoji search terms into percent-encoded forms servers accept — and decode the %C3%A9 soup in logs back into words.

UTM & Tracking Links

Build shareable campaign URLs where utm_source, utm_campaign, and dynamic values survive the trip through ad platforms and mail merges.

Debugging & Logs

Decode the percent-encoded request lines in server logs and browser devtools to see what was actually requested — and re-encode to reproduce it.

mailto & Form Data

Prefill mailto:?subject=…&body=… links that survive every client, and understand the + vs %20 convention your form backend speaks.

Share & Redirect URLs

Nest a URL inside a ?redirect= parameter without the inner & and ? corrupting the outer link — the classic one-level-of-encoding problem.

Complete Guide

URL Encoder/Decoder: The Complete A-to-Z Guide

How percent-encoding works, reserved vs unreserved characters, encodeURIComponent vs encodeURI, %20 vs +, and the double-encoding bugs that break redirects.

What Is URL Encoding (Percent-Encoding)?

URLs can only carry a limited alphabet reliably: letters, digits, and a handful of symbols (- _ . ~). Everything else — spaces, &, ?, #, é, emoji — must be written as percent-encoding: a % followed by the byte’s two-digit hexadecimal value. A space becomes %20, é becomes %C3%A9 (two UTF-8 bytes), and 😊 becomes %F0%9F%98%8A (four). RFC 3986 defines the scheme, and every server, browser, and API on the web speaks it. Encoding converts your data into that safe form; decoding reverses it back into readable text.

Reserved vs Unreserved Characters

The characters that make URLs work are the ones that make encoding tricky. Reserved characters have structural jobs: ? starts the query, & separates parameters, = assigns values, # starts the fragment, / separates path segments, + and : play their parts too. Inside a value you are writing (like a search term or a nested URL), any of these must be encoded — %26 for a literal & — or the server will read it as structure instead of data. Unreserved characters (A–Z a–z 0–9 - _ . ~) never need encoding, which is why clean slugs look the way they do.

encodeURIComponent vs encodeURI

JavaScript ships two encoders, and picking the wrong one is a classic bug. encodeURIComponent encodes everything except the unreserved set — it is for values: a single query parameter, a piece of text, a nested URL. encodeURI is for whole URLs: it deliberately preserves ://?&=# so the link stays navigable. Run encodeURI on a value and an ampersand sneaks through unencoded; run encodeURIComponent on a whole URL and the colons and slashes become %3A%2F%2F soup. This tool exposes both as “encode everything” vs “preserve structure” so the difference is one toggle, not a debugging session.

%20 vs +: Two Ways to Say “Space”

Spaces have two legal spellings and two separate histories. In URL paths, the standard is %20. In HTML form submissions (application/x-www-form-urlencoded, the GET encoding behind every search box) a space is written as +. They are not interchangeable in every context: some strict path parsers treat a literal + as a plus sign, and some form decoders never translate %20. Practical rule: query strings built from forms use +, everything else uses %20 — which is why this tool makes the choice explicit instead of guessing.

When Decoding Fails

Decoding goes wrong in two ways. First, malformed sequences: a stray % not followed by two hex digits (the classic 100% done typed into a field) is invalid encoding, and strict decoders throw — this tool catches the error and tells you instead of silently corrupting data. Second, the plus-sign question: %2B is a real plus, while a bare + usually means “space” — decode tools that treat every + as a space will mangle base64 values pasted into URLs. When a decoded string still looks encoded, you are looking at double encoding — see below.

Query Strings, UTM Parameters, and Analytics

Everything after the ? is a list of key=value pairs joined by &. The rule that matters: encode the values, never the separators. A campaign link like utm_source=news+letter&utm_campaign=spring%202025 survives mail merges and ad platforms; an unencoded space or ampersand inside a value truncates the parameter list mid-way and your analytics silently lose the campaign name. UTM values with spaces, ampersands, or non-ASCII characters are the most common source of broken tracking — encode them here before pasting into any ad platform.

Double Encoding: The Bug That Eats Redirects

Encoding is not idempotent: %20 encoded again is %2520 (the % itself became %25). Double encoding happens whenever a value passes through two layers that both encode — a redirect service wrapping a URL that an app already encoded, or a template that escapes a value you escaped yourself. The symptom: users land on your-site.com/redirect?url=https%3A%2F%2F…%3Fq%3Dcaf%25C3%25A9 and the inner page receives caf%C3%A9 instead of café. The fix is discipline: encode exactly once per layer, and decode with this tool repeatedly when untangling an existing mess — each pass strips one layer.

Step-by-Step: Using the URL Encoder/Decoder

  1. Paste your input. A full URL, a bare query string, or a plain text value.
  2. Pick the direction. Encode by default; hit the swap to decode.
  3. Choose the space style and scope. %20 + encode-everything for values; preserve-structure for whole URLs; + for form-style parameters.
  4. Read the live output as you type — 200 ms debounce keeps it snappy on long inputs.
  5. Copy the result into your link, config, or code. Decoding a mangled URL? Paste it in decode mode and watch it become readable.

Ready to Encode or Decode?

You know what percent-encoding is, when to reach for encodeURIComponent behavior vs encodeURI, why spaces have two spellings, and how to unwind double-encoded URLs. Scroll back up, paste your text, and convert it live — nothing leaves your browser.

Jump back to the URL encoder/decoder above ↑

Frequently Asked Questions

Everything you need to know about url encoder / decoder.
What is URL encoding (percent-encoding)?

URL encoding converts characters that are not allowed in a URL into a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and the character é becomes %C3%A9. This is defined by RFC 3986 and lets URLs be safely transmitted over the internet.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes everything except A-Za-z0-9-_.!~*'() — it is meant for individual URL components such as a single query-parameter value. encodeURI keeps URL-reserved characters (://?&=#) intact, so it is meant for full URLs. Toggle "Preserve URL structure" to switch to encodeURI mode.

Should spaces be encoded as %20 or +?

In a URL path, the standard is %20. In application/x-www-form-urlencoded form data (e.g., POST bodies and query strings in older APIs), spaces are encoded as +. The "Encode spaces as %20" option toggles between these conventions — %20 is the safer default for modern URLs.

Why does decoding show "Invalid URL encoding"?

This happens when the input contains a malformed percent sequence — for example a lone % not followed by two hex digits, or % followed by non-hex characters such as %zz. The decoder refuses to produce garbage output and shows the error so you can fix the input. The tool never crashes.

Is my data sent to a server?

No. This tool is 100% browser-based. All encoding and decoding runs as JavaScript inside your browser. Your text never leaves your device, nothing is logged, and there is no signup or daily limit.

Ready to use the URL Encoder / Decoder?

Open the tool