HTML Entity for Right Bracket (])

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+005D

What You'll Learn

How to display the Right Bracket (]) in HTML using the named entity, hexadecimal, decimal, and CSS escape methods. This symbol is U+005D (RIGHT SQUARE BRACKET) in the Basic Latin block (U+0000–U+007F)—the closing square bracket used in code snippets, array notation, JSON examples, and mathematical intervals.

Render it with ] (named), ], ], or CSS \5D. Related: U+005B ([, left bracket / [), U+007D (}, right brace / }).

⚡ Quick Reference — Right Bracket

Unicode U+005D

Basic Latin (ASCII)

Hex Code ]

Hexadecimal reference

HTML Code ]

Decimal reference

Named Entity ]

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+005D
Hex code       ]
HTML code      ]
Named entity   ]
CSS code       \5D
Meaning        Right square bracket (closing bracket)
Related        U+005B = left bracket ([)
               U+007D = right brace (})
1

Complete HTML Example

A simple example showing the Right Bracket (]) using the named entity, hexadecimal code, decimal HTML code, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\5D";
  }
 </style>
</head>
<body>
<p>Symbol using Hexadecimal: &#x5D;</p>
<p>Symbol using HTML Code: &#93;</p>
<p>Symbol using HTML Entity: &rbrack;</p>
<p id="point">Symbol using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Right Bracket (]) is part of Basic Latin and renders in all modern browsers:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Right Bracket (]) in code, array, and math contexts:

Array syntax [1, 2, 3]
JSON array "items": ["a", "b"]
Math interval [a, b]
Large glyph ]
Bracket pair [ ]
Entity refs &rbrack; &#x5D; &#93; \5D

🧠 How It Works

1

Named HTML Entity

&rbrack; is the named entity for the Right Bracket (right square bracket). It is easy to read in code and documentation markup.

HTML markup
2

Hexadecimal Code

&#x5D; uses the Unicode hexadecimal value 5D. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

&#93; uses the decimal Unicode value 93 for the same symbol.

HTML markup
4

CSS Entity

\5D is used in CSS stylesheets in the content property of pseudo-elements like ::after.

CSS stylesheet
=

Same visual result

All four methods produce ]. Unicode U+005D is in Basic Latin. Previous: Right Brace (}). Next: Right Dashed Arrow.

Use Cases

The Right Bracket (]) is commonly used in:

💻 Programming

Closing brackets in code examples, array access, and development documentation.

📋 JavaScript arrays

Array literals and indexing syntax in web development tutorials.

📄 JSON

JSON array examples, API documentation, and data-structure tutorials.

🔢 Math formulas

Closing brackets in mathematical expressions and interval notation.

🗃 Bracket matching

Syntax highlighting, code editors, and bracket-pair documentation.

🎓 Education

Programming courses and coding tutorials that teach bracket usage.

💡 Best Practices

Do

  • Prefer &rbrack; in HTML for readability
  • Use <pre> and <code> for multi-line code samples with brackets
  • Pair with &lbrack; ([) when showing balanced bracket pairs
  • Set <meta charset="utf-8">
  • Keep one encoding style per project for consistency
  • Escape brackets in attribute values when they could break parsing

Don’t

  • Confuse &rbrack; (U+005D) with &rbrace; (U+007D, right curly brace)
  • Confuse &rbrack; with &rpar; (U+0029, right parenthesis)
  • Use padded Unicode like U+0005D—the correct value is U+005D
  • Use padded CSS like \0005D—prefer \5D
  • Use CSS \5D inside HTML text nodes

Key Takeaways

1

Four ways to render U+005D in web content

&rbrack; &#x5D; &#93;
2

For CSS, use \5D in the content property

3

Unicode U+005D — RIGHT SQUARE BRACKET

4

Basic Latin block (U+0000–U+007F) — ASCII punctuation

❓ Frequently Asked Questions

Use &rbrack; (named), &#x5D; (hex), &#93; (decimal), or \5D in CSS content. All four methods render ] correctly.
U+005D (RIGHT SQUARE BRACKET). Basic Latin block (U+0000–U+007F). Hex 5D, decimal 93. The closing square bracket used in code and math.
In code snippets, array notation, JSON examples, mathematical intervals, and any content that requires a literal closing square bracket.
Named and numeric HTML references (&rbrack;, &#93;, &#x5D;) go in markup. The CSS escape \5D is used in stylesheets, typically on ::before or ::after. Both produce ].
Yes. &rbrack; is the named HTML entity for U+005D. You can also use &#93; (decimal), &#x5D; (hex), or \5D in CSS.

Explore More HTML Entities!

Discover 1500+ HTML character references — arrows, symbols, math operators, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful