Converters
Calculators
Other Tools
Browse tools
Web tools

URL encoder/decoder

Percent-encode text for safe use in a URL, or decode a percent-encoded string back to plain text — both directions, one box.

Never leaves your device No signup Free forever Not stored, not logged

Text

Result
More web tools

Related tools you might need next

All web tools

How it works

Two steps, no account

1

Paste your text

Plain text or a full URL to encode, or a percent-encoded string to decode — both go in the same box.

2

Pick a direction

Encode replaces reserved and non-ASCII characters with %XX sequences; Decode reverses it. Malformed % sequences are reported, not silently dropped.

FAQ

Common questions

Why does a space become "%20" instead of "+"?
This tool uses encodeURIComponent, which follows the RFC 3986 percent-encoding rules used for URL paths and query values — spaces become %20. The older application/x-www-form-urlencoded convention (spaces as +) is specific to HTML form submissions, not general URL encoding.
Which characters actually get encoded?
Letters, digits, and - _ . ! ~ * ' ( ) are left as-is; everything else — spaces, &, ?, /, non-ASCII characters, and so on — is replaced with its UTF-8 bytes written as %XX hex pairs.
What happens if I decode something that isn't valid percent-encoding?
The result shows "Invalid URL-encoded input" instead of garbage output — for example a stray % not followed by two valid hex digits — so it's obvious the decode failed rather than silently producing something wrong.
Is my text sent anywhere?
No. Encoding and decoding both run entirely in your browser using built-in JavaScript functions — nothing is transmitted, logged, or stored.
ad slot · bottom of content 336×280 / responsive
Related

People who used this also used

URL Encoder/Decoder

Our URL Encoder/Decoder helps you percent-encode text so it's safe to use inside a URL, or decode a percent-encoded string back to readable text. Both directions share one box, with instant results and clear error handling for malformed input.

How to Use the URL Encoder/Decoder Tool

1. Enter Your Text

  • Type or paste plain text, a query parameter value, or a full URL
  • Choose encode or decode
  • View results instantly

2. Choose Operation

  • Encode: Convert text into a percent-encoded, URL-safe string
  • Decode: Convert a percent-encoded string back to plain text
  • Copy results with one click

3. Handle Results

  • View the converted output
  • Copy to clipboard
  • Malformed input is reported clearly instead of silently mangled

Key Features

Encoding Options

  • Text and full URL support
  • UTF-8 character support, including emoji and non-Latin scripts
  • Instant, live conversion

Decoding Options

  • Percent-encoded string to text conversion
  • Malformed % sequence detection
  • Clear error message instead of a thrown exception

Use Cases

1. Web Development

  • Building a query string value that contains spaces, &, or ?
  • Debugging a URL that looks garbled after being pasted from another system
  • Preparing a redirect URL or webhook parameter for safe transport

2. API Work

  • Encoding a value before appending it to a REST API query string
  • Decoding a percent-encoded parameter received from a webhook or log line
  • Checking exactly what a third-party service sent inside an encoded URL

3. General Troubleshooting

  • Making sense of a URL copied from a browser address bar with encoded characters
  • Verifying that a link shared on social media or in an email will resolve correctly
  • Cleaning up a URL before sharing it in documentation

Technical Features

  • UTF-8 Support: Full character set, not just ASCII
  • RFC 3986 Encoding: Uses encodeURIComponent, the standard for URL path segments and query values
  • Real-Time Processing: Instant results
  • Error Handling: Malformed input detection with a readable message
  • Clipboard Integration: Easy copying

Why Use Our URL Encoder/Decoder

1. User-Friendly Design

  • One box, two clear actions
  • Instant feedback
  • Easy copying

2. Reliable Conversion

  • Standards-based encoding, not a custom approximation
  • Graceful handling of invalid % sequences
  • Full UTF-8 support

3. Privacy Focused

  • Client-side processing
  • No data storage
  • Offline capable once loaded

Understanding URL Encoding

What Is Percent-Encoding?

Percent-encoding (also called URL encoding) represents characters that aren't safe to use directly in a URL — spaces, &, ?, #, and non-ASCII characters — as a % followed by two hexadecimal digits representing that character's byte value. It lets arbitrary text travel safely inside a URL without breaking the URL's own structural characters.

encodeURIComponent vs. encodeURI

This tool uses encodeURIComponent, which encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — the right choice when encoding a single value that will be placed inside a query string or path segment. The related encodeURI function leaves characters like /, :, and & untouched, since those are meant to preserve the structure of a complete URL rather than a single component.

Common Applications

  1. Query Strings: Encoding a search term, email address, or free-text value before appending it to a URL
  2. API Requests: Safely embedding parameters in REST endpoints
  3. Form Data: Understanding how browsers encode submitted values
  4. Log Analysis: Decoding encoded values found in server access logs

Best Practices

  1. Encode Values, Not Whole URLs: Run encodeURIComponent on individual parameter values, not the full URL string, to avoid double-encoding structural characters like / and ?
  2. Decode Once: Decoding an already-decoded string can corrupt data that legitimately contains a % character
  3. Watch for Double-Encoding: If a decoded result still contains %XX sequences, the input was likely encoded twice
  4. Validate Before Decoding: A malformed % sequence (not followed by two hex digits) will fail decoding — this tool reports that clearly instead of crashing

Remember: percent-encoding is a reversible transport format, not encryption or compression — encoded text is exactly as readable as the original once decoded, and typically a little longer.