{"id":18254,"date":"2026-09-25T20:57:31","date_gmt":"2026-09-25T17:57:31","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/how-to-write-an-ipv6-address\/"},"modified":"2026-09-25T20:57:31","modified_gmt":"2026-09-25T17:57:31","password":"","slug":"how-to-write-an-ipv6-address","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/how-to-write-an-ipv6-address\/","title":{"rendered":"How to Write an IPv6 Address: Format and Shortening Rules"},"content":{"rendered":"<div class=\"hy-tldr\" dir=\"ltr\" style=\"background:#f6f7fb;border-left:4px solid #d83954;border-radius:10px;padding:14px 18px;margin:0 0 20px;line-height:1.8;text-align:left\"><strong>In short:<\/strong> An IPv6 address is made of 8 groups separated by colons (:), and each group is 16 bits written as 4 hexadecimal digits. You can shorten it by removing leading zeros in each group, and by replacing one run of all-zero groups with a double colon (::).<\/div>\n<h2>The full format<\/h2>\n<p>An IPv6 address is 128 bits long. It is written as 8 groups of 4 hexadecimal digits (0-9 and a-f), separated by colons. For example:<\/p>\n<p><code>2001:0db8:0000:0000:0000:ff00:0042:8329<\/code><\/p>\n<h2>Rule 1: remove leading zeros<\/h2>\n<p>In each group you can drop the zeros at the start. The address above becomes:<\/p>\n<p><code>2001:db8:0:0:0:ff00:42:8329<\/code><\/p>\n<h2>Rule 2: replace consecutive zero groups with ::<\/h2>\n<p>One run of groups that are all zero can be replaced with a double colon:<\/p>\n<p><code>2001:db8::ff00:42:8329<\/code><\/p>\n<p>You can use <strong>::<\/strong> only once in an address; otherwise it would be impossible to know how many groups each one replaces.<\/p>\n<h2>Common examples<\/h2>\n<ul>\n<li><code>::1<\/code> is the loopback address, the IPv6 version of 127.0.0.1.<\/li>\n<li><code>::<\/code> means an unspecified address (all zeros).<\/li>\n<li><code>fe80::\/10<\/code> addresses are link-local, used only inside a local network.<\/li>\n<\/ul>\n<h2>Writing IPv6 in a URL<\/h2>\n<p>Because colons are also used for ports, put an IPv6 address in square brackets in a URL: <code>http:\/\/[2001:db8::1]:8080\/<\/code>.<\/p>\n<h2>What does \/64 mean?<\/h2>\n<p>The number after the slash is the prefix length: <code>2001:db8::\/64<\/code> means the first 64 bits identify the network and the remaining 64 bits identify devices in it.<\/p>\n<p>Want to understand how the two versions compare? Read <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/the-difference-between-ipv6-and-ipv4\/\">IPv4 vs IPv6: key differences<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In short: An IPv6 address is made of 8 groups separated by colons (:), and each group is 16 bits written as 4 hexadecimal digits. You can shorten it by removing leading zeros in each group, and by replacing one run of all-zero groups with a double colon (::). The full format An IPv6 address [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","inline_featured_image":false,"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2733],"doc_tag":[],"class_list":["post-18254","docs","type-docs","status-publish","hentry","doc_category-servers-without-control-panel"],"year_month":"2026-09","word_count":225,"total_views":"1","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"ahmed fathy","author_nicename":"ahmed-fathy","author_url":"https:\/\/www.hyyat.com\/en\/author\/ahmed-fathy\/"},"doc_category_info":[{"term_name":"servers without control panel","term_url":"https:\/\/www.hyyat.com\/en\/kb\/servers-without-control-panel\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=18254"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18254\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=18254"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=18254"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=18254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}