Small collection of lookup tables I need often enough to put on one page. All static HTML — no JavaScript, no tracking, no analytics, no accounts.
All 33 prefix lengths, from /0 to /32. Usable hosts excludes network and broadcast addresses, except /31 (RFC 3021 point-to-point) and /32 (single host). Notation per RFC 4632.
| CIDR | Netmask | Wildcard | Total | Usable | Notes |
|---|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | — | default route |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | multicast range starts /4 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | class A / 10.0.0.0/8 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | CGNAT 100.64.0.0/10 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 172.16.0.0/12 private |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | class B / 192.168.0.0/16 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | class C |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | point-to-point |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | RFC 3021 PtP |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | single host |
The allocation boundaries worth memorising. See RFC 4291 and the IANA IPv6 address space.
| Prefix | Addresses | /64 subnets | Typical use |
|---|---|---|---|
| /32 | 296 | 4,294,967,296 | Regional ISP allocation |
| /40 | 288 | 16,777,216 | Large enterprise |
| /48 | 280 | 65,536 | Site / end-user assignment (RIPE recommendation) |
| /52 | 276 | 4,096 | Small site |
| /56 | 272 | 256 | Residential customer (common ISP default) |
| /60 | 268 | 16 | Minimum home assignment |
| /64 | 264 | 1 | Standard subnet — SLAAC requires this |
| /96 | 232 | — | IPv4-embedded / NAT64 (64:ff9b::/96) |
| /112 | 216 | — | Point-to-point convention |
| /126 | 4 | — | Point-to-point (IPv6 equivalent of /30) |
| /127 | 2 | — | Point-to-point (RFC 6164) |
| /128 | 1 | — | Single host |
The ones that'll bite you if you forget them. Full list: IANA special-purpose registry, RFC 6890.
| IPv4 range | Purpose |
|---|---|
| 0.0.0.0/8 | "this network" (RFC 1122) |
| 10.0.0.0/8 | private (RFC 1918) |
| 100.64.0.0/10 | CGNAT (RFC 6598) |
| 127.0.0.0/8 | loopback |
| 169.254.0.0/16 | link-local / APIPA |
| 172.16.0.0/12 | private (RFC 1918) |
| 192.0.0.0/24 | IETF protocol assignments |
| 192.0.2.0/24 | TEST-NET-1 (docs) |
| 192.168.0.0/16 | private (RFC 1918) |
| 198.18.0.0/15 | benchmark testing |
| 198.51.100.0/24 | TEST-NET-2 (docs) |
| 203.0.113.0/24 | TEST-NET-3 (docs) |
| 224.0.0.0/4 | multicast |
| 240.0.0.0/4 | reserved ("class E") |
| 255.255.255.255/32 | limited broadcast |
| IPv6 range | Purpose |
|---|---|
| ::/128 | unspecified |
| ::1/128 | loopback |
| ::ffff:0:0/96 | IPv4-mapped |
| 64:ff9b::/96 | NAT64 well-known |
| 100::/64 | discard-only (RFC 6666) |
| 2001:db8::/32 | documentation |
| 2001::/23 | IETF protocol assignments |
| 2002::/16 | 6to4 |
| fc00::/7 | ULA — unique local |
| fe80::/10 | link-local |
| ff00::/8 | multicast |
| ff02::1 | all-nodes (link) |
| ff02::2 | all-routers (link) |
| ff02::1:ff00:0/104 | solicited-node multicast |
| 2000::/3 | global unicast (currently allocated) |
The ones that show up in zones I actually edit. Types are registered at IANA.
| A | IPv4 address |
| AAAA | IPv6 address |
| CNAME | canonical name alias |
| MX | mail exchanger (priority + host) |
| NS | name server delegation |
| SOA | zone start-of-authority |
| PTR | reverse DNS pointer |
| TXT | free-form text (SPF, DMARC, ACME) |
| SRV | service locator (port + weight) |
| CAA | cert-issuance authorisation |
| DNSKEY | DNSSEC signing key |
| DS | delegation signer |
| RRSIG | signed record set |
| NSEC / NSEC3 | authenticated denial |
| TLSA | DANE (cert-binding) |
| SSHFP | SSH key fingerprint |
| HTTPS | HTTPS service binding (RFC 9460) |
| SVCB | generic service binding |
The ones I actually see. RFC 9110; the IANA status code registry has the rest.
| 2xx / 3xx | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 202 | Accepted |
| 204 | No Content |
| 206 | Partial Content (Range) |
| 301 | Moved Permanently |
| 302 | Found (see 307/308) |
| 304 | Not Modified |
| 307 | Temporary Redirect (preserves method) |
| 308 | Permanent Redirect (preserves method) |
| 4xx / 5xx | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized (auth required) |
| 403 | Forbidden (auth won't help) |
| 404 | Not Found |
| 409 | Conflict |
| 422 | Unprocessable Entity |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway |
| 503 | Service Unavailable |
| 504 | Gateway Timeout |
The well-known assignments I reach for without looking up. Authoritative list: IANA service names and port numbers.
| 20 / 21 | FTP data / control |
| 22 | SSH |
| 23 | Telnet |
| 25 | SMTP |
| 53 | DNS |
| 67 / 68 | DHCP server / client |
| 80 | HTTP |
| 110 | POP3 |
| 123 | NTP |
| 143 | IMAP |
| 161 / 162 | SNMP / traps |
| 389 / 636 | LDAP / LDAPS |
| 443 | HTTPS / QUIC |
| 465 / 587 | SMTPS / submission |
| 514 | syslog |
| 993 / 995 | IMAPS / POP3S |
| 3306 | MySQL / MariaDB |
| 5432 | PostgreSQL |
| 6379 | Redis |
| 8080 | HTTP alt |
| 8443 | HTTPS alt |
| 9000 | Portainer / PHP-FPM |
Linux x86-64 numbering. Defaults in parentheses. From signal(7).
| 1 | SIGHUP | reload config (term) |
| 2 | SIGINT | Ctrl+C (term) |
| 3 | SIGQUIT | core (core) |
| 6 | SIGABRT | abort (core) |
| 8 | SIGFPE | arith error (core) |
| 9 | SIGKILL | uncatchable (term) |
| 11 | SIGSEGV | segfault (core) |
| 13 | SIGPIPE | broken pipe (term) |
| 14 | SIGALRM | timer (term) |
| 15 | SIGTERM | polite kill (term) |
| 17 | SIGCHLD | child state (ign) |
| 18 | SIGCONT | resume |
| 19 | SIGSTOP | uncatchable stop |
| 20 | SIGTSTP | Ctrl+Z (stop) |
| 28 | SIGWINCH | window resize (ign) |
| 30 | SIGUSR1 | user-defined |
Each digit = owner / group / other. Combine: read 4, write 2, execute 1. See chmod(1).
| Digit | Binary | rwx | Meaning |
|---|---|---|---|
| 0 | 000 | --- | none |
| 1 | 001 | --x | execute |
| 2 | 010 | -w- | write |
| 3 | 011 | -wx | write + execute |
| 4 | 100 | r-- | read |
| 5 | 101 | r-x | read + execute |
| 6 | 110 | rw- | read + write |
| 7 | 111 | rwx | all |
| Common | Mode | Meaning |
|---|---|---|
| 644 | rw-r--r-- | regular file (default) |
| 664 | rw-rw-r-- | group-writable file |
| 600 | rw------- | private (SSH keys, tokens) |
| 640 | rw-r----- | config readable by group |
| 755 | rwxr-xr-x | script / directory |
| 775 | rwxrwxr-x | group-writable dir |
| 700 | rwx------ | private dir (.ssh) |
| 777 | rwxrwxrwx | do not do this |
| 1777 | rwxrwxrwt | sticky bit (/tmp) |
| 2755 | rwxr-sr-x | setgid directory |
| 4755 | rwsr-xr-x | setuid binary |
PCRE / POSIX ERE — the overlap that works almost everywhere. Reference: pcre2pattern, POSIX regex.
| Class | Matches |
|---|---|
| . | any char (not newline by default) |
| \d | digit [0-9] |
| \D | non-digit |
| \w | word char [A-Za-z0-9_] |
| \W | non-word |
| \s | whitespace |
| \S | non-whitespace |
| \b | word boundary |
| \B | non-word-boundary |
| ^ | start of line / string |
| $ | end of line / string |
| \A | start of string (absolute) |
| \z | end of string (absolute) |
| Quantifier | Meaning |
|---|---|
| ? | 0 or 1 |
| * | 0 or more (greedy) |
| + | 1 or more (greedy) |
| *? | 0 or more (lazy) |
| +? | 1 or more (lazy) |
| {n} | exactly n |
| {n,} | n or more |
| {n,m} | n to m |
| (?:...) | non-capturing group |
| (?=...) | lookahead |
| (?!...) | negative lookahead |
| (?<=...) | lookbehind |
| (?<!...) | negative lookbehind |
Base-10, per the BIPM SI brochure.
| Symbol | Name | Factor |
|---|---|---|
| k | kilo | 103 |
| M | mega | 106 |
| G | giga | 109 |
| T | tera | 1012 |
| P | peta | 1015 |
| E | exa | 1018 |
| Symbol | Name | Factor |
|---|---|---|
| m | milli | 10−3 |
| µ | micro | 10−6 |
| n | nano | 10−9 |
| p | pico | 10−12 |
| f | femto | 10−15 |
| a | atto | 10−18 |
Decimal vs. binary. Use the right one. Binary prefixes are IEC 80000-13.
| SI (decimal) | Bytes |
|---|---|
| kB | 1,000 |
| MB | 1,000,000 |
| GB | 1,000,000,000 |
| TB | 1012 |
| PB | 1015 |
| IEC (binary) | Bytes |
|---|---|
| KiB | 1,024 |
| MiB | 1,048,576 |
| GiB | 1,073,741,824 |
| TiB | 240 |
| PiB | 250 |
Prefix with \e[ and suffix with m. Reset is 0. ECMA-48 / console_codes(4).
| Code | Foreground |
|---|---|
| 30 | black |
| 31 | red |
| 32 | green |
| 33 | yellow |
| 34 | blue |
| 35 | magenta |
| 36 | cyan |
| 37 | white |
| 90-97 | bright variants |
| Code | Attribute |
|---|---|
| 0 | reset all |
| 1 | bold |
| 2 | dim |
| 3 | italic |
| 4 | underline |
| 7 | reverse |
| 9 | strikethrough |
| 40-47 | background (same colors) |
Standard time. DST shifts by +1h where applicable. Canonical data: IANA tz database.
| UTC+0 | UTC / GMT / WET / Reykjavik |
| UTC+1 | CET — Berlin, Paris, Madrid |
| UTC+2 | EET — Athens, Helsinki, Kyiv |
| UTC+3 | Moscow, Istanbul, Riyadh |
| UTC+4 | Dubai, Baku |
| UTC+5:30 | IST — India |
| UTC+7 | Bangkok, Jakarta |
| UTC+8 | Beijing, Singapore, Perth |
| UTC+9 | JST — Tokyo, Seoul |
| UTC+10 | AEST — Sydney |
| UTC+12 | NZST — Auckland |
| UTC−3 | São Paulo, Buenos Aires |
| UTC−5 | EST — New York, Toronto |
| UTC−6 | CST — Chicago, Mexico City |
| UTC−7 | MST — Denver |
| UTC−8 | PST — LA, Vancouver |
0–127. Control characters greyed. Everything above 127 is not ASCII, whatever the codepage says. RFC 20.
| Dec | Hex | Char |
|---|---|---|
| 0 | 0x00 | NUL |
| 1 | 0x01 | SOH |
| 2 | 0x02 | STX |
| 3 | 0x03 | ETX |
| 4 | 0x04 | EOT |
| 5 | 0x05 | ENQ |
| 6 | 0x06 | ACK |
| 7 | 0x07 | BEL |
| 8 | 0x08 | BS |
| 9 | 0x09 | HT |
| 10 | 0x0A | LF |
| 11 | 0x0B | VT |
| 12 | 0x0C | FF |
| 13 | 0x0D | CR |
| 14 | 0x0E | SO |
| 15 | 0x0F | SI |
| 16 | 0x10 | DLE |
| 17 | 0x11 | DC1 |
| 18 | 0x12 | DC2 |
| 19 | 0x13 | DC3 |
| 20 | 0x14 | DC4 |
| 21 | 0x15 | NAK |
| 22 | 0x16 | SYN |
| 23 | 0x17 | ETB |
| 24 | 0x18 | CAN |
| 25 | 0x19 | EM |
| 26 | 0x1A | SUB |
| 27 | 0x1B | ESC |
| 28 | 0x1C | FS |
| 29 | 0x1D | GS |
| 30 | 0x1E | RS |
| 31 | 0x1F | US |
| Dec | Hex | Char |
|---|---|---|
| 32 | 0x20 | SP |
| 33 | 0x21 | ! |
| 34 | 0x22 | " |
| 35 | 0x23 | # |
| 36 | 0x24 | $ |
| 37 | 0x25 | % |
| 38 | 0x26 | & |
| 39 | 0x27 | ' |
| 40 | 0x28 | ( |
| 41 | 0x29 | ) |
| 42 | 0x2A | * |
| 43 | 0x2B | + |
| 44 | 0x2C | , |
| 45 | 0x2D | - |
| 46 | 0x2E | . |
| 47 | 0x2F | / |
| 48 | 0x30 | 0 |
| 49 | 0x31 | 1 |
| 50 | 0x32 | 2 |
| 51 | 0x33 | 3 |
| 52 | 0x34 | 4 |
| 53 | 0x35 | 5 |
| 54 | 0x36 | 6 |
| 55 | 0x37 | 7 |
| 56 | 0x38 | 8 |
| 57 | 0x39 | 9 |
| 58 | 0x3A | : |
| 59 | 0x3B | ; |
| 60 | 0x3C | < |
| 61 | 0x3D | = |
| 62 | 0x3E | > |
| 63 | 0x3F | ? |
| Dec | Hex | Char |
|---|---|---|
| 64 | 0x40 | @ |
| 65 | 0x41 | A |
| 66 | 0x42 | B |
| 67 | 0x43 | C |
| 68 | 0x44 | D |
| 69 | 0x45 | E |
| 70 | 0x46 | F |
| 71 | 0x47 | G |
| 72 | 0x48 | H |
| 73 | 0x49 | I |
| 74 | 0x4A | J |
| 75 | 0x4B | K |
| 76 | 0x4C | L |
| 77 | 0x4D | M |
| 78 | 0x4E | N |
| 79 | 0x4F | O |
| 80 | 0x50 | P |
| 81 | 0x51 | Q |
| 82 | 0x52 | R |
| 83 | 0x53 | S |
| 84 | 0x54 | T |
| 85 | 0x55 | U |
| 86 | 0x56 | V |
| 87 | 0x57 | W |
| 88 | 0x58 | X |
| 89 | 0x59 | Y |
| 90 | 0x5A | Z |
| 91 | 0x5B | [ |
| 92 | 0x5C | \ |
| 93 | 0x5D | ] |
| 94 | 0x5E | ^ |
| 95 | 0x5F | _ |
| Dec | Hex | Char |
|---|---|---|
| 96 | 0x60 | ` |
| 97 | 0x61 | a |
| 98 | 0x62 | b |
| 99 | 0x63 | c |
| 100 | 0x64 | d |
| 101 | 0x65 | e |
| 102 | 0x66 | f |
| 103 | 0x67 | g |
| 104 | 0x68 | h |
| 105 | 0x69 | i |
| 106 | 0x6A | j |
| 107 | 0x6B | k |
| 108 | 0x6C | l |
| 109 | 0x6D | m |
| 110 | 0x6E | n |
| 111 | 0x6F | o |
| 112 | 0x70 | p |
| 113 | 0x71 | q |
| 114 | 0x72 | r |
| 115 | 0x73 | s |
| 116 | 0x74 | t |
| 117 | 0x75 | u |
| 118 | 0x76 | v |
| 119 | 0x77 | w |
| 120 | 0x78 | x |
| 121 | 0x79 | y |
| 122 | 0x7A | z |
| 123 | 0x7B | { |
| 124 | 0x7C | | |
| 125 | 0x7D | } |
| 126 | 0x7E | ~ |
| 127 | 0x7F | DEL |
What goes in Content-Type. Full registry at IANA.
| Type | Extension / use |
|---|---|
| text/html | .html |
| text/css | .css |
| text/plain | .txt |
| text/csv | .csv |
| text/javascript | .js, .mjs |
| application/json | .json |
| application/xml | .xml |
| application/pdf | |
| application/zip | .zip |
| application/gzip | .gz |
| application/octet-stream | anything binary |
| application/x-www-form-urlencoded | form posts |
| multipart/form-data | file uploads |
| application/wasm | .wasm |
| Type | Extension / use |
|---|---|
| application/manifest+json | .webmanifest |
| image/png | .png |
| image/jpeg | .jpg, .jpeg |
| image/gif | .gif |
| image/webp | .webp |
| image/avif | .avif |
| image/svg+xml | .svg |
| image/x-icon | .ico |
| font/woff2 | .woff2 |
| font/ttf | .ttf |
| audio/mpeg | .mp3 |
| audio/ogg | .ogg, .oga |
| video/mp4 | .mp4 |
| video/webm | .webm |