Skip to content
Encoding Tool

URL Encoder & Decoder

Encode special characters for URLs or decode percent-encoded strings back to readable text.

0 characters

Introduction

URLs can contain only a subset of ASCII characters—letters, digits, and a handful of reserved symbols like slash and question mark—and any character outside this set must be percent-encoded before it can be safely embedded in a URL. A URL encoder/decoder handles this translation in both directions: converting special characters like spaces, quotes, and Unicode into their %XX or %XX%XX representations, and converting percent-encoded sequences back into their original characters. Whether you're constructing a query string with user-provided search terms or debugging a garbled URL from a server log, the tool ensures that every character survives the round trip intact.

What Is URL Encoder/Decoder?

A URL encoder/decoder is a text-transformation utility that converts between raw character strings and their percent-encoded representations as defined by RFC 3986 (URI Generic Syntax). Percent encoding replaces each disallowed byte with a percent sign followed by two hexadecimal digits: a space becomes %20, a double quote becomes %22, and the Unicode character 'é' (UTF-8 bytes C3 A9) becomes %C3%A9. The decoder reverses this process, interpreting each %XX sequence as a byte and reconstructing the original string from the resulting byte sequence using UTF-8 decoding.

The tool exists because URL encoding is a frequent source of bugs in web development. Double-encoding (encoding an already-encoded string) produces sequences like %2520 instead of %20, which breaks links and API calls. Under-encoding (failing to encode special characters) allows injection attacks and malformed URLs that servers reject. A dedicated encoder/decoder that correctly applies the RFC 3986 rules prevents both classes of error by making the encoding explicit and reversible.

The distinction between RFC 3986 encoding and application/x-www-form-urlencoded encoding matters in practice. RFC 3986 encodes a space as %20 and does not encode certain characters like tilde (~). Form-encoding, used in query strings submitted by HTML forms, encodes a space as + and encodes tilde. Using the wrong convention for a given context causes interoperability failures—APIs that expect %20 may reject +, and vice versa. The tool lets you select the appropriate convention for your use case.

URL Encoder/Decoder Examples

InputOutput
Encode: 'hello world & friends = true'hello%20world%20%26%20friends%20%3D%20true
Decode: 'https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%26lang%3Den'https://example.com/search?q=café&lang=en
Encode (form-encoding): 'name=John Doe&city=New York'name=John+Doe&city=New+York
Decode: '%E2%82%AC%201000'€ 1000

Key Features of URL Encoder/Decoder

  • Bidirectional encoding and decoding following RFC 3986 URI percent-encoding rules
  • Form-encoding mode (application/x-www-form-urlencoded) that encodes spaces as + instead of %20
  • Full UTF-8 support that correctly encodes and decodes multi-byte Unicode characters including CJK, emoji, and accented Latin
  • Double-encode detection that warns when the input appears to already be percent-encoded, preventing %2520-type corruption
  • Real-time conversion that updates the output as you type without a submit action
  • Reserved-character awareness that optionally preserves URL-structural characters (/, ?, &, =) during encoding of full URLs
  • One-click copy and clear for efficient workflow when debugging multiple URL strings

How It Works

1

Enter Your URL or Text String

Paste the URL or text containing special characters that you want to encode, or paste a percent-encoded string you want to decode. The tool handles query parameters, fragment identifiers, and any text with characters that have special meaning in URLs.

2

Percent-Encoding Conversion

The encoder replaces reserved characters like spaces, ampersands, and question marks with their percent-encoded equivalents such as %20, %26, and %3F. The decoder reverses this process, converting percent-encoded sequences back to their original characters so you can read the URL in plain text.

3

Copy the Encoded or Decoded URL

The result appears instantly and can be copied for use in your HTML links, API requests, redirect rules, or server configuration. The encoded output is guaranteed safe for use in any URL context without risk of misinterpretation by browsers or servers.

Who Uses This

Web Developers

encoding query string parameters that contain spaces, special characters, or user-generated content before appending them to API endpoints or redirect URLs to prevent malformed requests

SEO Specialists

decoding percent-encoded URLs from analytics and log files to see the actual keywords and paths users searched for, making reports more readable and actionable

QA Testers

encoding test data with special characters like emojis, CJK characters, or accented letters to verify that their application correctly handles internationalized URLs and form submissions

Frequently Asked Questions

What is the difference between URL encoding and URI encoding?
URL encoding and URI encoding refer to the same percent-encoding mechanism defined in RFC 3986. They convert characters outside the allowed set into percent-sign followed by two hexadecimal digits. The terms are used interchangeably, though URI is the broader specification that includes URLs and URNs.
Should I encode the entire URL or just the query parameters?
Encode only the query parameter values and path segments that contain special characters. The protocol prefix, domain name, and structural characters like slashes and question marks should not be encoded. Encoding the entire URL would break it by converting the protocol and domain into unresolvable text.
Does the tool encode spaces as %20 or as plus signs?
The tool uses the standard %20 encoding for spaces, which is correct for URLs and path segments. The plus-sign convention for spaces applies only to application/x-www-form-urlencoded data in HTML form submissions, not to general URL encoding. Using %20 is universally safe.