You are on page 1of 7

8/2/13

HTML URL Encoding Reference


Search w3schools.com: Select Language

HOME

HTML

C SS

JAVASC RIPT

JQUERY

XML

ASP.NET

PHP

SQL

MORE...

R EFER ENC ES

EXAMPLES

FO R UM

ABO UT

Get Certified
Study Web Technologies and get a diploma at w3schools.com

SHARE THIS PAGE

Like

76k

HTML Reference
HTML by Alphabet HTML by Function HTML Attributes HTML Events HTML Canvas HTML Audio/Video HTML Doctypes HTML Colornames HTML Colorpicker HTML Colormixer HTML Character Sets HTML ASCII HTML ISO-8859-1 HTML Symbols HTML URL Encode HTML Lang Codes HTTP Messages HTTP Methods Keyboard Shortcuts

HTML URL Encoding Reference


Previous Next Reference
URL encoding converts characters into a format that can be transmitted over the Internet.

WEB HOSTING
Best Web Hosting eUK Web Hosting UK Reseller Hosting Domain, Hosting & Email

URL - Uniform Resource Locator


Web browsers request pages from web servers by using a URL. The URL is the address of a web page, like: http://www.w3schools.com. WEB BUILDING
XML Editor - Free Trial! FREE Website BUILDER FREE Website C reator Best Website Templates

URL Encoding
URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces. URL encoding normally replaces a space with a + sign.

STATISTICS
Browser Statistics OS Statistics Display Statistics

Try It Yourself
If you click the "Submit" button below, the browser will URL encode the input before it is sent to the server. A page at the server will display the received input. Hello Gnter Submit

HTML Tags
<!--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <command> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset>

Try some other input and click Submit again.

URL Encoding Functions


In JavaScript, PHP, and ASP there are functions that can be used to URL encode a string. In JavaScript you can use the encodeURI() function. PHP has the rawurlencode() function and ASP has the Server.URLEncode() function. Click the "URL Encode" button to see how the JavaScript function encodes the text. Hello Gnter URL Encode

Note: The JavaScript function encodes space as %20.

URL Encoding Reference


ASCII Character space ! " # $ % & ' ( ) * + , . / 0 URL-encoding %20 %21 %22 %23 %24 %25 %26 %27 %28 %29 %2A %2B %2C %2D %2E %2F %30

w3schools.com/tags/ref_urlencode.asp

1/7

8/2/13
<figcaption> <figure> <font> <footer> <form> <frame> <frameset> <head> <header> <h1> - <h6> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen> <label> <legend> <li> <link> <map> <mark> <menu> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <table> <tbody> <td> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> R S T U V W X Y Z [ \ ] ^ _ ` a b P Q = > ? @ A B C D E F G H I J K L M N O ; < 1 2 3 4 5 6 7 8 9 :

HTML URL Encoding Reference


%31 %32 %33 %34 %35 %36 %37 %38 %39 %3A %3B %3C %3D %3E %3F %40 %41 %42 %43 %44 %45 %46 %47 %48 %49 %4A %4B %4C %4D %4E %4F %50 %51 %52 %53 %54 %55 %56 %57 %58 %59 %5A %5B %5C %5D %5E %5F %60 %61 %62

w3schools.com/tags/ref_urlencode.asp

2/7

8/2/13
<wbr> c d e f g h i j k l m n o p q r s t u v w x y z { | } ~

HTML URL Encoding Reference


%63 %64 %65 %66 %67 %68 %69 %6A %6B %6C %6D %6E %6F %70 %71 %72 %73 %74 %75 %76 %77 %78 %79 %7A %7B %7C %7D %7E %7F ` %80 %81 %82 %83 %84 %85 %86 %87 %88 %89 %8A %8B %8C %8D %8E %8F %90 %91 %92 %93 %94 %95

w3schools.com/tags/ref_urlencode.asp

3/7

8/2/13

HTML URL Encoding Reference


%96 %97 %98 %99 %9A %9B %9C %9D %9E %9F %A0 %A1 %A2 %A3 %A4 %A5 %A6 %A7 %A8 %A9 %AA %AB %AC %AD %AE %AF %B0 %B1 %B2 %B3 %B4 %B5 %B6 %B7 %B8 %B9 %BA %BB

%BC %BD %BE %BF %C0 %C1 %C2 %C3 %C4 %C5 %C6

w3schools.com/tags/ref_urlencode.asp

4/7

8/2/13

HTML URL Encoding Reference


%C7 %C8 %C9 %CA %CB %CC %CD %CE %CF %D0 %D1 %D2 %D3 %D4 %D5 %D6 %D7 %D8 %D9 %DA %DB %DC %DD %DE %DF %E0 %E1 %E2 %E3 %E4 %E5 %E6 %E7 %E8 %E9 %EA %EB %EC %ED %EE %EF %F0 %F1 %F2 %F3 %F4 %F5 %F6 %F7 %F8 %F9

w3schools.com/tags/ref_urlencode.asp

5/7

8/2/13

HTML URL Encoding Reference


%FA %FB %FC %FD %FE %FF

URL Encoding Reference


The ASCII device control characters %00-%1f were originally designed to control hardware devices. Control characters have nothing to do inside a URL. ASCII Character NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US Description null character start of header start of text end of text end of transmission enquiry acknowledge bell (ring) backspace horizontal tab line feed vertical tab form feed carriage return shift out shift in data link escape device control 1 device control 2 device control 3 device control 4 negative acknowledge synchronize end transmission block cancel end of medium substitute escape file separator group separator record separator unit separator URL-encoding %00 %01 %02 %03 %04 %05 %06 %07 %08 %09 %0A %0B %0C %0D %0E %0F %10 %11 %12 %13 %14 %15 %16 %17 %18 %19 %1A %1B %1C %1D %1E %1F

Previous

Next Reference

w3schools.com/tags/ref_urlencode.asp

6/7

8/2/13

HTML URL Encoding Reference

Top 10 Tutorials
HTML Tutorial HTML5 Tutorial C SS Tutorial C SS3 Tutorial JavaScript Tutorial jQuery Tutorial SQL Tutorial PHP Tutorial ASP.NET Tutorial XML Tutorial

Top 10 References
HTML/HTML5 Reference C SS 1,2,3 Reference C SS 3 Browser Support JavaScript HTML DOM XML DOM PHP Reference jQuery Reference ASP.NET Reference HTML C olors

Examples
HTML Examples C SS Examples XML Examples JavaScript Examples HTML DOM Examples XML DOM Examples AJAX Examples ASP.NET Examples Razor Examples ASP Examples SVG Examples

Quizzes
HTML Quiz HTML5 Quiz XHTML Quiz C SS Quiz JavaScript Quiz jQuery Quiz XML Quiz ASP Quiz PHP Quiz SQL Quiz

Color Picker

Statistics
Browser Statistics Browser OS Browser Display

RE P O RT E RRO R

HO ME

TO P

P RI N T

FO RU M

A BO U T

A D V E RT I SE WI T H U S

W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use and privacy policy. C opyright 1999-2013 by Refsnes Data. All Rights Reserved.

w3schools.com/tags/ref_urlencode.asp

7/7

You might also like