How to type { (Left curly brace)

On macOS, U.S. keyboard:

⇧ Shift+[

See the animated keys

{ on every keyboard

SystemLayoutKey combination
macOS French – Numerical ⌥ Option+(
macOS French ⌥ Option+(
macOS Belgian ⌥ Option+(
macOS Swiss French ⌥ Option+8
macOS Canadian Multilingual (CSA) ⌥ Option+7
macOS Canadian French ⇧ Shift+[
macOS Spanish ⌥ Option+´
macOS Latin American {
macOS U.S. ⇧ Shift+[
macOS ABC ⇧ Shift+[
macOS U.S. International – PC ⇧ Shift+[

What is the left curly brace for?

The left curly brace { opens a block in most programming languages: C, Java, JavaScript, PHP, Rust or Go. It always comes with its closing partner, Right curly brace }.

if (total > 0) {
  console.log(total);
}

You will also find it:

  • in JSON objects: {"name": "Jane"};
  • in CSS rules: a { color: inherit; };
  • in templates (Twig, Handlebars, Vue): {{ title }};
  • in mathematics, to write a set: {1, 2, 3}.

Pitfalls

  • Do not mix up braces { }, brackets [ ] and parentheses ( ): one slip is a syntax error. On this layout, square brackets are typed like this: [.
  • On other layouts the brace is somewhere else entirely, for example ⌥ Option+( on French – Numerical. If your shortcuts “stop working”, check the active input source in the menu bar.
  • In a code editor, the brace may close itself: the editor adds }, not the keyboard.

{ technical details

Unicode code pointU+007B
Official Unicode nameLEFT CURLY BRACKET
HTML entity{
CSScontent: "\7B";
JavaScript / JSON"\u007B"
UTF-8 bytes7B
URL encoding%7B

The official name comes from the Unicode Character Database (ICU).

Related characters