Skip to content

URL Encoder & Decoder - Percent-Encode URLs Online

Plain Text
URL Encoded

About the URL Encoder and Decoder

URLs have a strict specification (RFC 3986) that only allows a limited set of ASCII characters. Spaces, ampersands, non-ASCII characters, and many punctuation marks must be percent-encoded before they can safely appear in a URL, especially in query string values. This tool encodes text into its percent-encoded form or decodes percent-encoded strings back to readable text.

Incorrect URL encoding is one of the most common causes of broken links, failed API calls, and garbled data. Using a dedicated encoding tool prevents these issues by applying the rules consistently and correctly.

How to Use the URL Encoder

To encode, paste your text into the input field and select "Encode." Special characters and non-ASCII text will be replaced with their percent-encoded equivalents. To decode, switch to "Decode" mode and paste a percent-encoded string. The original text appears in the output. Click the copy button to grab the result for use in your URLs, API requests, or configuration files.

Features

  • Encode and decode modes. Switch between encoding and decoding with a single toggle.
  • Full Unicode support. Correctly handles multi-byte UTF-8 characters, including emoji, CJK text, and accented letters.
  • RFC 3986 compliant. Encoding follows the URL standard, ensuring compatibility with browsers and servers.
  • Real-time results. Output updates instantly as you type or paste input.
  • Client-side processing. Your input stays in the browser; nothing is transmitted to a server.

When to Use URL Encoding

URL encoding matters whenever user-generated text appears in a URL. Search queries, form data sent via GET requests, redirect URLs passed as parameters, and OAuth callback URLs all require proper encoding. Backend developers constructing URLs programmatically use it to avoid injection issues. Front-end developers encode filenames and labels that appear in download links. And anyone debugging a broken URL with garbled characters needs a decoder to see what the original text was supposed to be.

Frequently Asked Questions

What is URL encoding (percent-encoding)?
URL encoding replaces unsafe or reserved characters in a URL with a percent sign followed by two hexadecimal digits representing the character's byte value. For example, a space becomes '%20' and an ampersand becomes '%26'. This ensures the URL is transmitted correctly by browsers and servers.
Which characters need to be URL-encoded?
Characters that have special meaning in URLs must be encoded when used as data values. This includes spaces, ampersands (&), equals signs (=), question marks (?), hash symbols (#), plus signs (+), and non-ASCII characters like accented letters or emoji.
What is the difference between encodeURI and encodeURIComponent?
encodeURI is designed for encoding a full URI and preserves characters like ':', '/', '?', and '#' that are valid in a URL's structure. encodeURIComponent encodes everything except unreserved characters and is meant for individual query parameter values. This tool uses encodeURIComponent, which is the safer choice for parameter encoding.
Can I encode an entire URL with query parameters?
You can encode individual values that go into query parameters. Encoding an entire URL (including the protocol and path) is usually not desired because it would encode the structural characters like '://' and '/'. Paste just the parameter values you need to encode.