Skip to content
    TheCalculatorsCalculate Anything. Anytime.
    HomeCalculatorsCategoriesBlogAbout
    HomeCalculatorsCategoriesBlogAbout
    1. Home
    2. Developer
    3. Url Encode

    Url Encode

    Encode unsafe characters for use in URLs and query strings, or decode %xx escape sequences back to plain text. Uses the standard encodeURIComponent alphabet (A–Z a–z 0–9 and - _ . ! ~ * ' ( ) stay untouched) and flags malformed escapes when decoding.

    #url encode#url decode#percent encoding#encodeURIComponent#query string

    TheCalculators — Url Encode

    Printed thecalculators.com

    Live mode: results update as you type.

    Encoded Result

    Hello%20World!%20search%3Fq%3Ddark%20mode%20%26%20coffee%3Dyes

    62 characters

    Operation
    Encode
    Input Length
    44 chars
    Output Length
    62 chars
    Length Change
    +18
    Encoding Overhead
    40.9%
    Non-ASCII Chars
    0

    How it works

    1. 1Safe alphabetencodeURIComponent leaves A–Z a–z 0–9 - _ . ! ~ * ' ( ) untouched
    2. 2Everything elseEach byte becomes %XX, where XX is its hex code — a space is %20, & is %26, = is %3D
    3. 3DecodingEach %XX is read back to its character; malformed sequences raise an error

    Common escape reference

    CharacterEncoded
    Space%20
    !%21
    #%23
    $%24
    &%26
    '%27
    +%2B
    /%2F
    :%3A
    =%3D
    ?%3F
    %%25

    When decoding, "+" is treated as a space (the application/x-www-form-urlencoded convention). Reserve + literally as %2B when encoding.

    Most useful next

    Encoded Result

    Hello%20World!%20search%3Fq%3Ddark%20mode%20%26%20coffee%3Dyes

    Formula

    encoded = text with every unsafe byte replaced by %XX (hex)

    Pro tips

    • • Encode query parameter values separately, then join them with & and =.
    • • A very long encoded output usually means non-ASCII text — consider a shorter slug.

    FAQ

    Related Calculators

    More Developer tools you might need.

    Base64 Encode

    Encode text to Base64 or decode Base64 back to text — instantly, safely in your browser.

    Calculate

    Binary Calculator

    Add, subtract, multiply or divide binary values and convert between base 2, 8, 10 and 16.

    Calculate

    Hex Calculator

    Hex arithmetic and instant conversion between hexadecimal, decimal, octal and binary.

    Calculate

    Bandwidth Calculator

    Estimate download or upload time from file size and connection speed, at any unit.

    Calculate
    TheCalculatorsCalculate Anything. Anytime.

    Your all-in-one destination for free online calculators. Simple. Fast. Accurate. Always here for you.

    Quick Links

    • Home
    • All Calculators
    • Categories
    • Blog
    • About Us
    • Contact

    Popular Categories

    • Health Calculators31
    • Finance Calculators62
    • Education Calculators9
    • Travel Calculators8
    • Everyday Calculators65
    • Developer Calculators7

    Resources

    • Calculator Guide
    • Tips & Tutorials
    • Calc of the Day
    • FAQs
    • Privacy Policy
    • Terms of Service
    • Sitemap

    © 2026 TheCalculators. All rights reserved. · 204 free tools and counting.

    Calculate Anything, Anytime.Made for a Smarter World

    /orCtrl Kto searchEscto close dialogsEnterto calculate