Skip to content

Curly brackets { } (braces)

Curly brackets { }, or braces, group code and list the members of a set in math. On a US keyboard, press Shift with the [ and ] keys to the right of P.

U+007B · LEFT CURLY BRACKET

Block: Basic Latin · Unicode 1.1 · Open punctuation

How to type it

Windows
Win + . (period) opens the emoji & symbol panel
Microsoft Word
007B, then Alt + X
Mac
Control + Command + Space opens the Character Viewer
Linux (GTK/IBus)
Ctrl + Shift + U, 7b, Space

Codes for developers

Code point
U+007B
Unicode name
LEFT CURLY BRACKET
HTML entity
{
CSS
content: "\007B";
JavaScript / JSON
"\u007B"
Python
"\u007B"
URL encoding
%7B
UTF-8
7B
UTF-16
007B

Look-alike characters

  • RIGHT CURLY BRACKET
  • LEFT PARENTHESIS
  • LEFT SQUARE BRACKET
  • LEFT WHITE CURLY BRACKET

Where braces are used

Braces almost never appear in ordinary prose. Their home is code and math:

  • Code blocks: C, C++, Java, JavaScript, C# and many other languages wrap function bodies, loops and conditions in braces.
  • JSON and objects: {"name": "Ava", "age": 9} is a JSON object.
  • CSS: each rule’s declarations sit inside braces: p { margin: 0; }.
  • Templates and placeholders: Hello, {name} in many template systems, ${total} in JavaScript template literals, {{ title }} in Jinja-style templates.
  • Set notation: {1, 2, 3} is the set containing 1, 2 and 3, and {} is the empty set.
  • Regular expressions: a{2,4} matches two to four a’s in a row.
  • Piecewise functions: one tall left brace groups the cases.

Braces, brackets and parentheses

American and British English name these differently, which causes mix-ups:

ShapeUS nameAlso called
( )parenthesesround brackets; “brackets” in the UK
[ ]bracketssquare brackets
{ }bracescurly brackets, curly braces
⟨ ⟩angle bracketschevrons

In regular writing, braces have no job. If you need an aside inside parentheses, use square brackets, not braces: (see the 2023 report [page 12]). ⦃ ⦄ (white curly brackets) are a separate pair used in some math notation.

Typing braces on phones and in LaTeX

  • iPhone: open the numbers keyboard, then tap #+=. Braces are on the top row.
  • Android (Gboard): on the second symbols page.
  • LaTeX: braces group arguments, so a plain { prints nothing. Use \{ and \} for literal braces, as in \{1, 2, 3\}, and \left\{ for a tall brace.
  • Word: Insert > Equation offers braces that stretch for piecewise functions.
  • Format strings: in Python f-strings and in C# String.Format, double the brace to print it: {{ gives {.

Frequently asked questions

How do I type curly brackets?

On a US keyboard, hold Shift and press [ for { or ] for }. The keys are to the right of P.

What is the difference between brackets and braces?

In US usage, brackets are square [ ], braces are curly { }, and parentheses are round ( ).

What do curly brackets mean in math?

They enclose the elements of a set, as in {2, 4, 6}.

Why do my braces disappear in LaTeX?

LaTeX uses braces for grouping. Type { and } to print them.

Unicode data: Unicode Character Database 18.0.0 (unicode.org).

More symbols

All symbols · Copy and paste symbols · Emoji search