acento.io
Developer tool

URL Encoder & Decoder

Percent-encode text for safe use in URLs, or decode encoded strings back to plain text — entirely in your browser, with no data sent to any server.

By Carlos Suárez , Systems engineer
Last updated:

What this URL encoder & decoder does

This English-language tool converts text to percent-encoded format following RFC 3986, the IETF standard that defines how characters must be represented in a Uniform Resource Identifier. Every non-ASCII byte expands to three characters (e.g. %C3%A9), so URL-encoding can add up to 200% overhead for UTF-8 text — worth keeping in mind when building query strings with user-supplied input. You can encode in two modes: encodeURI, which preserves reserved characters like /, ?, and &, or encodeURIComponent, which encodes everything except unreserved characters. The decode tab reverses the process, turning percent-encoded values back into readable text. 100% client-side — your data never leaves your browser. No uploads, no tracking, no server logs.

Features

  • Two encoding modes. Switch between encodeURI (safe for full URLs, keeps reserved chars intact) and encodeURIComponent (encodes reserved chars like & = ? # — correct for individual query values).
  • Accurate UTF-8 handling. Multi-byte characters — including Unicode 15.1's newer CJK extensions and emoji — are encoded to their correct %XX%XX sequences, not silently dropped or mangled.
  • One-click decode. Paste any percent-encoded string and switch to the Decode tab to recover the original text. Useful when debugging double-encoded values in logs, where %20 has accidentally become %2520.
  • Instant copy. The Copy button transfers the result to your clipboard without any extra clicks, so you can paste straight into a terminal, code editor, or browser address bar.
  • Runs entirely in your browser. No server processes your input. This matters when encoding OAuth redirect URIs, API tokens, or query strings that contain emails or other sensitive identifiers. If you also need to encode binary data as text, our [Base64 encoder & decoder](/en/base64/) handles that.

How to use the URL encoder & decoder

Paste your text, choose a mode, and the output updates immediately. Use the Encode tab to prepare values, the Decode tab to inspect encoded strings.

  1. Choose a tab. Select Encode to convert plain text to a percent-encoded string, or Decode to reverse an existing encoded URL.
  2. Paste or type your input. Enter the text you want to process. For encoding query parameters, check the "Encode as component" option so characters like & and = are also escaped — equivalent to JavaScript's encodeURIComponent('a b&c=d') or Python's from urllib.parse import quote; quote('a b&c=d', safe='').
  3. Review the output. The encoded or decoded result appears immediately below the input. Check for unexpected sequences — a space should become %20 in path segments.
  4. Copy the result. Click Copy to send the output to your clipboard, then paste it wherever you need it — a URL, a config file, or your source code.

Common use cases

  • Building query string parameters. When constructing URLs programmatically — for example, appending a search term or a filter value — each parameter value must be component-encoded so characters like & and = don't break the query string structure.
  • Encoding OAuth redirect URIs. OAuth 2.0 flows require the redirect_uri parameter to be percent-encoded when included in an authorization URL. A misencoded redirect URI is a common source of 'invalid_redirect_uri' errors in production.
  • Debugging encoded values in logs. HTTP server logs often show double-encoded strings where %20 has become %2520. Pasting the raw log value into the Decode tab quickly shows you the original text without having to count percent signs manually.
  • Analytics and tracking parameters. UTM parameters for campaigns run out of cities like San Francisco or Chicago often contain spaces and special characters. Encoding them correctly ensures analytics platforms attribute sessions accurately. If you need to package a URL into a QR code afterward, the [QR code generator](/en/qr-code-generator/) is right next door.
  • Python and PHP URL encoding. When writing backend scripts in Python or PHP that construct redirect URLs, it's faster to validate the encoded output in a browser tool first — especially for non-ASCII inputs — before wiring it into production code.

Frequently asked questions

What's the difference between encodeURI and encodeURIComponent?

encodeURI is designed for a full URL — it leaves reserved characters like /, ?, &, and = untouched because they have structural meaning. encodeURIComponent encodes those characters too, making it the right choice for individual query parameter values. Using encodeURI on a query value that contains & will silently break your query string.

Why does a space sometimes appear as + instead of %20?

It depends on the context. In URL path segments, a space must be %20 per RFC 3986. In application/x-www-form-urlencoded bodies (classic HTML forms), spaces are conventionally encoded as +. If you're building a query string in JavaScript or a fetch call, use encodeURIComponent, which always produces %20.

Is my data safe to paste here?

Yes. This tool runs 100% in your browser — no input is sent to any server, stored, or logged. That makes it safe to use with OAuth tokens, email addresses, API keys embedded in redirect URIs, or any other sensitive query string values.

What is double-encoding and how do I fix it?

Double-encoding happens when an already-encoded string gets encoded a second time, turning %20 into %2520. It usually occurs in middleware or proxies that encode a URL without checking whether it was already encoded. Paste the broken string into the Decode tab here, verify the output, then re-encode only the parts that need it.

Does this tool handle non-Latin characters correctly?

Yes. Multi-byte UTF-8 characters — including Arabic, Chinese, Japanese, Korean, and emoji — are encoded to their correct multi-part percent sequences (e.g. é → %C3%A9). Browsers may display some of these as readable characters in the address bar, but the underlying encoded form is what actually gets transmitted.

How is URL encoding different from HTML entity encoding?

URL percent-encoding (defined in RFC 3986) replaces unsafe bytes with %XX sequences and is used inside URLs. HTML entity encoding replaces characters like < with &lt; and is used inside HTML markup. They serve different contexts and are not interchangeable — mixing them up is a common source of XSS vulnerabilities in web applications.