Skip to content
FlipConverto home

URL Encoder & Decoder

A URL encoder and URL decoder: URL encode text or decode an encoded address, with percent-encoding for one component and for a full URI kept distinct.

Loading URL Encoder & Decoder…

Runs entirely in your browser. What you enter stays on your device — nothing is sent to a server. Verify it yourself

When should I use encodeURIComponent instead of encodeURI?

Use component encoding for a single query value or path segment: it escapes &, =, ?, / and #, so a value containing an ampersand cannot split into two parameters. Use full-URI encoding for a whole URL, where those characters are doing their job as separators.

Cost
Free, no limits
Upload
None — runs on your device
Sign-up
Not required
Works offline
Yes, once loaded

How to URL encode or decode text

  1. Choose encode or decode

    The buttons at the top switch direction.

  2. Pick the scope

    Component encodes a single value — a query parameter or a path segment — including / ? & and =; Full URI leaves those alone so a whole address still works.

  3. Paste and copy

    The result updates as you type. The Reference table below explains the characters that matter most and what each becomes.

Examples

  • hello world & morehello%20world%20%26%20more

    Spaces and ampersands both need escaping inside a query value.

  • cafécaf%C3%A9

    Non-ASCII is encoded as its UTF-8 bytes, two here for é.

Key features of the URL Encoder & Decoder

  • Percent-encodes and decodes URL components
  • Handles Unicode via UTF-8, as the standard requires
  • Live conversion in both directions
  • Entirely client-side

Supported options

Modes

  • Encode
  • Decode

Scope

  • Component
  • Full URI

When should you use this?

  • Building a query string with user-supplied values.
  • Reading an encoded URL from a log or a redirect chain.
  • Escaping a value before putting it in a link.
  • Debugging a parameter that arrives mangled.

Limitations

  • Encoding a whole URL and encoding one component are different operations. Escaping an entire URL turns its slashes and colons into percent sequences and breaks it — this tool escapes components, which is what you almost always want.
  • A space is %20 in a path and may be + in a form-encoded query string. The two conventions coexist and the correct one depends on context.
  • Double-encoding is silent. Encoding an already-encoded value turns % into %25 and produces something that decodes to the wrong thing.

Troubleshooting

The decoded value still contains percent sequences

It was encoded more than once. Decode again — each pass removes one layer.

Spaces became + instead of %20

Both are correct in different places. Form-encoded query strings use +; paths and most APIs expect %20.

Common mistakes to avoid

  • Encoding the whole URL including the scheme and host. The result is not a usable link.
  • Encoding a value that a framework will encode again, producing double-encoded parameters.

Pro tips

Tips for better results

  • Building URLs

    Encode each value, never the finished URL

    Encode each parameter value individually as you build a URL, rather than encoding the finished string.

  • Double encoding

    %25 in a value means it was encoded twice

    If a value contains %25, it has probably been encoded twice somewhere upstream.

Standards and terms behind the URL Encoder & Decoder

The named things this tool works with, and the documents that define them.

Percent-encoding (RFC 3986)Specification
The URI rule that replaces reserved characters with %XX, which is what URL encoding means. Reference: Percent-encoding (RFC 3986)
URL slugHow it works
The readable, hyphenated last part of a web address, which search results and links both show.
Character encodingHow it works
The mapping from bytes to letters; the wrong one turns accents and emoji into rubbish.

Also searched as: encode a query string, decode %20, escape special characters in a url.

Component or full URI — the distinction that breaks things

There are two encoding functions and picking the wrong one is the most common URL-encoding bug.

Component escapes the reserved characters &, =, ?, / and #. Use it for a single query value or path segment. If a search term contains an ampersand and you do not escape it, the URL splits into two parameters and the value is silently truncated.

Full URI leaves those characters alone, because in a whole URL they are doing their job as separators. Encoding a complete URL with the component function produces a string that is no longer a URL.

The plus-sign problem

In a query string, some parsers read + as a space — a legacy of HTML form encoding, which is subtly different from URL encoding. A literal plus sign in a value therefore has to be escaped as %2B, or it may arrive as a space. This catches people out most often with phone numbers in international format.

Fragments never reach the server

Everything after # is the fragment and is handled entirely by the browser — it is never sent in the HTTP request. If a value containing an unescaped # goes into a URL, everything after it silently disappears from the server's point of view.

Privacy

The URL Encoder & Decoder runs entirely in your browser. What you enter and the result it produces stay on your own device — nothing is sent anywhere, because nothing needs to be.

You can confirm this rather than take our word for it: open your browser’s developer tools, watch the Network tab, and use the tool. No request carries your input. It also keeps working with the connection off.

Details are in the privacy policy.

What next?

For encoding data rather than escaping URL syntax.

Base64 instead

URL Encoder & Decoder — questions

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent escapes & = ? / # so a value cannot break the URL structure — use it for one query value or path segment. encodeURI leaves those characters intact so a whole URL keeps working. Encoding a full URL with the component function produces something that is no longer a URL.

Why does %20 appear instead of a space?

Spaces are not permitted in URLs, so they are percent-encoded as %20. In query strings some parsers also accept + for a space, which is why a literal plus sign must be encoded as %2B.

Why did everything after the # disappear?

The fragment — everything after # — is handled by the browser and never sent to the server. An unescaped # inside a value truncates it from the server's point of view. Encode it as %23.

When should I encode a URL?

Whenever a value goes into a URL: query parameters, path segments, redirect targets. Encode the value with the component mode, not the whole URL — the whole URL only needs encoding when it is itself being carried as a value.

Part of Developer Tools · Browse every tool