ConvertText.app LogoConvertText.app

URL Encoder / Decoder

Encode URLs, query strings, and special characters into percent encoding, or decode percent-encoded text back into readable URLs — instantly, directly in your browser. This URL encoder decoder works as a percent encoder, percent decoder, query string encoder, query string decoder, and a UTF-8 friendly URL encoding converter, all in one page.

Paste a URL or any text into the input, choose whether you want to encode or decode and whether you are working with a single URL component or a full URL, and copy the result. Everything runs locally in your browser using the standard JavaScript URL functions, so your input never leaves your device.

Conversion options
Pick whether you want to encode or decode, and whether you are working with a single URL component (e.g. a query value) or a full URL.

Component mode percent-encodes reserved characters like / ? # & = so a value is safe inside a query string or path segment.

Text to encode
Enter the text or URL you want to encode. Spaces become %20, special characters become percent-encoded.
0 chars
Encoded output
Percent-encoded result, safe to use in URLs.
0 chars

This is a private, browser-based URL encoder and decoder. It uses the native encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions to handle UTF-8 text safely without any server round-trip.

What does this URL encoder and decoder do?

A URL encoder converts characters that are not safe to use directly in a URL into percent-encoded sequences. A URL decoder reverses the process, turning percent-encoded text back into the original characters. This page does both, in either direction, for either a single URL component or a full URL.

Under the hood the tool uses the four standard JavaScript functions:

  • encodeURIComponent — for encoding a single URL component such as a query parameter value.
  • encodeURI — for encoding a full URL while preserving reserved characters like : / ? # & = that have a structural meaning.
  • decodeURIComponent — for decoding a single URL component back into its original characters.
  • decodeURI — for decoding a full URL without touching reserved characters.

All conversions are UTF-8 aware, so accented letters, emoji, and characters from non-Latin scripts round-trip correctly. Nothing is uploaded, nothing is stored, and there are no API calls.

URL encoding examples

A few practical examples of what URL encoding looks like in practice:

  • A space becomes %20, so hello world is encoded as hello%20world.
  • A forward slash inside a query value becomes %2F, so a/b becomes a%2Fb when used as a parameter.
  • A question mark in a value becomes %3F, so what? becomes what%3F.
  • An ampersand in a value becomes %26, which avoids breaking the surrounding query string.
  • A hash in a value becomes %23, so c# becomes c%23.
  • Non-ASCII characters use multi-byte UTF-8 sequences. For example café becomes caf%C3%A9 (the é is two UTF-8 bytes).
  • Emoji also use multi-byte UTF-8. 😀 becomes %F0%9F%98%80.

Switch the tool to Decode and paste any of these encoded strings to see the original text restored exactly.

URL component vs full URL encoding

Choosing the right mode matters because the two encoders treat reserved characters differently.

Use Component mode (encodeURIComponent / decodeURIComponent) when you are encoding a single value that will be inserted into a URL — for example a query parameter value, a path segment, or a fragment value. Component mode percent-encodes reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) so they cannot accidentally change the structure of the surrounding URL.

Use Full URL mode (encodeURI / decodeURI) when you have a complete URL such as https://example.com/path?query=value#fragment and you only want to escape characters that are otherwise unsafe (for example spaces or non-ASCII characters). Full URL mode preserves reserved characters because they form the URL's structure.

A common mistake is using encodeURI on a value that is supposed to be a query parameter. The reserved characters survive untouched, which can corrupt the surrounding URL. When in doubt, encode each query value with encodeURIComponent and assemble the URL afterwards.

What is percent encoding?

Percent encoding (also called URL encoding) is a way to represent characters in a URL that are either reserved (have a structural meaning) or not allowed in URLs at all. Each unsafe byte is written as a percent sign followed by two hexadecimal digits — for example %20 for a space, %2F for a slash, or %3F for a question mark.

The encoding works on bytes, not on characters directly. Modern URLs use UTF-8 to convert characters to bytes first, which is why a single accented letter can become two percent-encoded bytes and an emoji can become four. This tool always uses UTF-8 so encoded strings are interoperable with the rest of the web.

Percent encoding is defined by RFC 3986. The native JavaScript functions used here implement that specification, so a value encoded with encodeURIComponent in any modern browser is decoded the same way by decodeURIComponent everywhere else.

When to use this tool

This URL encoder decoder is useful any time you need to safely move text into or out of a URL. Common scenarios include:

  • Encoding text for a query string before pasting it into an API request, log line, or browser bar.
  • Decoding URL parameters from a request log or analytics export so you can read the original values.
  • Inspecting a long encoded URL by decoding it and checking what is actually being passed.
  • Escaping special characters in a URL before sharing it in chat, documentation, or a JSON payload.
  • Teaching or learning how percent encoding and UTF-8 byte sequences map to characters.

Because the tool runs entirely in your browser, it is also a good fit for sensitive URLs (internal links, tokens, signed URLs) you would rather not paste into a remote service.

URL encoding vs URL cleaning

URL encoding and URL cleaning are two different operations that are often confused.

URL encoding (this tool) transforms characters into a URL-safe form using percent encoding, and the reverse operation turns percent-encoded text back into the original characters. The structure of the URL is preserved; nothing is added or removed.

URL cleaning (a separate kind of tool) strips tracking parameters such as utm_source, utm_medium, fbclid, gclid, and similar query keys from a URL so the resulting link no longer contains tracking metadata. URL cleaning changes the parameters in the URL — encoding does not.

If you want to remove tracking parameters, you need a dedicated URL cleaner. If you want to encode or decode text into and out of percent-encoded form, this is the right tool.

Frequently Asked Questions

What is a URL encoder and decoder?

A URL encoder converts characters that are reserved or unsafe inside a URL into percent-encoded sequences (for example a space becomes %20). A URL decoder reverses the process and restores the original characters. This page does both directions and supports either a single URL component or a full URL, all in your browser.

What is URL encoding?

URL encoding is the process of replacing characters that have a special meaning in URLs, or that are not allowed in URLs at all, with percent-encoded sequences. Each unsafe byte is written as a percent sign followed by two hexadecimal digits. URL encoding is also known as percent encoding and is defined by RFC 3986.

What is percent encoding?

Percent encoding is the encoding scheme used by URLs to represent unsafe or reserved characters. The character is converted to one or more bytes (UTF-8 for modern URLs), and each byte is written as a percent sign followed by its two-digit hexadecimal value. For example, a space is byte 0x20 and is written as %20.

When should I use encodeURIComponent instead of encodeURI?

Use encodeURIComponent when you are encoding a single value that will be plugged into a URL — typically a query parameter value, a path segment, or a fragment value. It percent-encodes reserved characters like /, ?, #, & and = so they cannot accidentally change the structure of the surrounding URL. Use encodeURI when you already have a complete URL and only want to escape characters that are otherwise unsafe (such as spaces or non-ASCII characters), without touching reserved structural characters.

What is the difference between %20 and +?

Both can represent a space, but in different contexts. %20 is the standard percent encoding of a space and is valid anywhere in a URL. The + character is only interpreted as a space inside application/x-www-form-urlencoded data — typically the body of an HTML form submission or query strings produced by some legacy code. The native decodeURIComponent and decodeURI functions do NOT convert + to a space, and this tool follows the same strict behavior in v1: + is preserved exactly as you typed it. If you are decoding form data and need + to mean space, replace + with a space yourself before decoding.

Can this tool decode query strings?

Yes. Paste an encoded query string (or a single encoded value) into the input and switch the direction to Decode. Use Component mode for an individual parameter value and Full URL mode if you are decoding the URL as a whole. Note that the tool does not split a query string into key/value pairs for you — it decodes the percent-encoded characters in whatever text you paste.

Does this URL decoder support UTF-8 characters?

Yes. The native JavaScript functions used here treat percent-encoded sequences as UTF-8 bytes, so accented letters, emoji, and characters from non-Latin scripts decode back to their original form. For example caf%C3%A9 decodes to café and %F0%9F%98%80 decodes to 😀. If a sequence is not valid UTF-8 the decoder reports a malformed input error rather than producing replacement characters silently.

Is my text uploaded to a server?

No. The encoder and decoder run entirely in your browser using the standard JavaScript URL functions. Your input is never sent to a server, never stored, and never logged. Closing the tab discards everything. That makes the tool safe for internal links, tokens, signed URLs, and any URL you would rather not paste into a remote service.

Is URL encoding the same as URL cleaning?

No. URL encoding transforms characters into and out of percent-encoded form without changing which parameters are present. URL cleaning is a separate operation that removes tracking parameters such as utm_source, utm_medium, fbclid, or gclid from a URL. If you want to strip trackers from a link you need a dedicated URL cleaner; this page only encodes and decodes.

Why do some decoded URLs still contain percent signs?

If the original URL was encoded twice (double-encoded), a single decode pass will only undo one layer. For example %2520 decodes to %20, which then decodes to a space on a second pass. Run the result through the decoder again if it still looks encoded. A literal percent sign that is not part of a valid escape (for example abc%) is invalid percent encoding and the decoder will report a malformed input error instead of guessing.

Explore More Text Tools

Free online tools to convert, encode, and transform your text

Convert Case

Transform text case — uppercase, lowercase, title case & more

Morse Code Translator

Convert text to Morse code and vice versa

Morse Code Audio Decoder

Decode Morse code from audio files or microphone

Binary Translator

Convert text to binary and vice versa

Base64 Encoder/Decoder

Encode and decode Base64 text

Hex Converter

Convert text to hexadecimal and vice versa

ROT13 Encoder/Decoder

Encode and decode text using ROT13 cipher

Superscript Generator

Convert text to Unicode superscript where supported

Subscript Generator

Convert text to Unicode subscript where supported

Strikethrough Text Generator

Generate copy-paste Unicode strikethrough text instantly

Image to Base64 Converter

Convert images to Base64 / Data URI