URL Encoder

Awaiting text
Input
Plain text
0 ln0 ch0 B
Output
Encoded URL · encodeURIComponent
0 ln0 ch0 B
Encoded output (component mode) appears here as you type.

Percent-encode and decode URLs in your browser

Convert plain text to percent-encoded strings for query parameters, path segments, and API URLs. Toggle Component mode (encodeURIComponent) or URI mode (encodeURI) depending on whether you are encoding a single value or a full URL.

Everything runs locally in your browser. Your strings are never uploaded — ideal for debugging fetch URLs, form submissions, and redirect links with Unicode or special characters.

  • Encode text to percent-encoding
  • Decode %XX sequences to plain text
  • encodeURIComponent (component) mode
  • encodeURI (full URI) mode
  • UTF-8 & Unicode support
  • 100% client-side & free

Frequently asked questions

What is URL encoding (percent-encoding)?

URL encoding replaces unsafe characters with a percent sign followed by two hexadecimal digits — for example, a space becomes %20. Browsers and APIs use it so query strings, paths, and non-ASCII text travel safely in URLs.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes almost every special character and is meant for a single query parameter value or path segment. encodeURI leaves reserved URI characters such as : / ? # intact and is meant for an entire URL string.

When should I use Component mode vs URI mode?

Use Component mode when encoding one value for a query string (e.g. search=q%20term) or a path segment. Use URI mode when you need to encode a full URL while keeping structural characters like slashes and question marks.

Is my text sent to a server?

No. Encoding and decoding run entirely in your browser. Your strings never leave your device.

Why does decode fail with a percent error?

decodeURIComponent requires valid %XX sequences. A lone %, incomplete hex digits, or mixed encodings from different tools often cause errors. Re-encode from plain text or fix the malformed sequence.

How do I encode Unicode or emoji?

JavaScript uses UTF-8 under the hood, so characters like 日本語 or 😀 are encoded as multiple percent-encoded bytes automatically. Paste the raw text and copy the encoded output.

How is this different from Base64 or JWT encoding?

Percent-encoding is for URLs and HTTP query strings. Base64 is for binary-safe text transport. JWTs use Base64URL inside tokens. Use this tool for hrefs, fetch URLs, and form values — not for JWT payloads.

Is the URL Encoder free?

Yes. It is free, requires no signup, and works offline after the page loads.