What Are Instagram Short Codes?

Instagram short codes (shortcodes) are the alphanumeric identifiers in Instagram URLs that uniquely identify posts, reels, and IGTV videos.

https://instagram.com/p/CXhfQ9OgFjP/

✅ The highlighted part is the Instagram shortcode

Where to Find Instagram Shortcodes

Regular Posts

instagram.com/p/SHORTCODE/

Reels

instagram.com/reel/SHORTCODE/

IGTV Videos

instagram.com/tv/SHORTCODE/

Shortcode Format

Instagram shortcodes have specific characteristics:

  • Length: Typically 11 characters
  • Characters: Letters (A-Z, a-z), numbers (0-9), underscore (_), hyphen (-)
  • Case-sensitive: CXhfQ9OgFjP ≠ cxhfq9ogfjp
  • Unique: Each shortcode identifies exactly one post
  • Permanent: Shortcodes don't change over time

Last updated

How Instagram Shortcodes Work

Instagram shortcodes are base64url encoded representations of numeric media IDs. They convert long 19-digit numbers into shorter, URL-friendly 11-character strings.

Shortcode vs Media ID

Shortcode

11 characters

CXhfQ9OgFjP

Used in URLs

Short Code Quick Reference

  • Found in URL after /p/, /reel/, or /tv/
  • Uses URL-safe Base64: A-Z, a-z, 0-9, -, _
  • Typically 11 characters for modern posts
  • Encodes the numeric post ID, which encodes the creation timestamp
  • Permanent — never changes after post creation
  • Works for posts, reels, and IGTV — not for stories (they expire)

Enter any Instagram short code or post URL to decode the creation date and numeric ID.

Media ID

19 digits

2722326650967095055

Used in API

Why Instagram Uses Shortcodes

  • Shorter URLs: 11 characters vs 19 digits makes URLs cleaner
  • URL-friendly: No special characters that need encoding
  • Easier to share: Shorter codes are easier to type and remember
  • Consistent format: All shortcodes have the same length
  • Maintains uniqueness: Each post has a unique shortcode

What Information Do Shortcodes Contain?

Instagram shortcodes encode the media ID, which contains:

  • Timestamp: When the post was created
  • Unique identifier: Distinguishes this post from all others
  • Internal metadata: Instagram's internal tracking information

How to Get Instagram Shortcodes

Method 1: From Browser

  1. Open the Instagram post in your browser
  2. Look at the URL in the address bar
  3. Copy the code after /p/, /reel/, or /tv/

Method 2: From Mobile App

  1. Open the post in the Instagram app
  2. Tap the three dots (•••) menu
  3. Select "Copy Link"
  4. Paste to see the URL with the shortcode

Common Use Cases

  • Sharing Instagram posts via URL
  • Embedding Instagram posts on websites
  • Tracking specific posts for analytics
  • Converting between shortcodes and media IDs
  • Building Instagram integration tools
  • Archiving Instagram content

Shortcode Conversion

You can convert between Instagram shortcodes and numeric media IDs:

  • Shortcode → Media ID: Decode using base64url decoding
  • Media ID → Shortcode: Encode using base64url encoding
  • Extract timestamp: Media IDs contain creation timestamps

Technical Details

Encoding: Base64url (URL-safe Base64)

Character set: A-Z, a-z, 0-9, -, _

Length: 11 characters (typically)

Format: No padding (= characters removed)

Examples

Example 1: Where to Find Short Codes

Instagram URL formats and where the short code appears:

Regular post:
  https://www.instagram.com/p/CxYz123abcd/
                              ^^^^^^^^^^^
                              Short code: CxYz123abcd

Reel:
  https://www.instagram.com/reel/CxYz123abcd/
                                  ^^^^^^^^^^^
                                  Short code: CxYz123abcd

IGTV:
  https://www.instagram.com/tv/CxYz123abcd/
                               ^^^^^^^^^^^
                               Short code: CxYz123abcd

How to get the URL:
  Web: Copy from browser address bar
  Mobile: Tap ⋯ (three dots) → Copy Link
  The short code is always the segment after /p/, /reel/, or /tv/

Example 2: Short Code Structure

Short codes use Instagram's URL-safe Base64 alphabet:
  A-Z = values 0-25   (26 characters)
  a-z = values 26-51  (26 characters)
  0-9 = values 52-61  (10 characters)
  -   = value 62      (1 character)
  _   = value 63      (1 character)
  Total: 64 characters (6 bits per character)

Short code "CxYz123abcd" decoded:
  C=2, x=49, Y=24, z=51, 1=53, 2=54, 3=55, a=26, b=27, c=28, d=29
  → Numeric ID: 2847392847392847392
  → Creation date: August 15, 2023 at 14:32:07 UTC

The short code is a compact, URL-safe representation of the numeric post ID,
which itself encodes the creation timestamp.

Example 3: Short Code Length and Post Age

Short code length indicates approximate post age:

Early Instagram (2010-2012): 8 characters
  Example: "B1a2b3c4"
  These are rare — very early posts

Growing Instagram (2012-2015): 9-10 characters
  Example: "B1a2b3c4d" or "B1a2b3c4d5"

Modern Instagram (2017-present): 11 characters
  Example: "CxYz123abcd"
  Most posts you encounter today

Very recent posts: 11 characters (same length, larger values)
  Example: "DxYz123abcd" (starts with later alphabet letters)

Quick check: If a post claims to be from 2015 but has an 11-character
short code starting with C or D, the date claim may be inaccurate.

Frequently Asked Questions

Instagram short codes (shortcodes) are alphanumeric identifiers in Instagram URLs that uniquely identify posts, reels, and IGTV videos. For example, in 'instagram.com/p/CXhfQ9OgFjP/', the shortcode is 'CXhfQ9OgFjP'. They're base64-like encoded versions of numeric media IDs.

Instagram shortcodes are base64url encoded representations of numeric media IDs. They convert long numeric IDs (19 digits) into shorter, URL-friendly strings (11 characters). This makes URLs cleaner and easier to share while maintaining uniqueness.

Instagram shortcodes appear in post URLs after '/p/', '/reel/', or '/tv/'. For example: instagram.com/p/SHORTCODE, instagram.com/reel/SHORTCODE, or instagram.com/tv/SHORTCODE. Copy the alphanumeric string after these prefixes to get the shortcode.

Yes, Instagram shortcodes can be decoded to numeric media IDs using base64 decoding. The shortcode is a base64url encoded string that, when decoded, reveals the numeric media ID and timestamp information.

Instagram shortcodes encode the media ID, which contains timestamp information about when the post was created. By decoding the shortcode, you can extract the creation date and numeric identifier of the Instagram post.