Key icon
boxicons:key
The Key icon (boxicons:key) is a free SVG icon from the Boxicons set. It is drawn on a 24 × 24 grid. Boxicons are released under the MIT license, which allows use in personal and commercial projects. Copy it as SVG, JSX, Vue or Svelte code, or download the SVG file.
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M8 21c2.76 0 5-2.24 5-5c0-1.02-.31-1.96-.83-2.75l3.33-3.33l1.79 1.79l1.41-1.41l-1.79-1.79L18 7.42l2.29 2.29L21.7 8.3l-2.29-2.29l1.29-1.29l-1.41-1.41l-8.54 8.54c-.79-.52-1.74-.83-2.75-.83c-2.76 0-5 2.24-5 5s2.24 5 5 5Zm0-8c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3"/></svg>How to use the Key icon
React
import { Icon } from "@iconify/react";
<Icon icon="boxicons:key" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="boxicons:key" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="boxicons:key" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[boxicons--key]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/boxicons -->
<div class="i-boxicons:key"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="boxicons:key"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/boxicons/key.svg" alt="Key icon" width="24" height="24">Related icons in Boxicons
key-alt
key-alt-filled
key-filled
keyboard
keyboard-filled
keyframe
keyframe-ease-in
keyframe-ease-in-filled
keyframe-ease-out
keyframe-ease-out-filled
keyframe-easy-ease
keyframe-easy-ease-filled
keyframe-filled
keyframe-hold-ease-in
keyframe-hold-ease-in-filled
keyframe-hold-ease-out
keyframe-hold-ease-out-filled
keyframe-hold-linear-in
keyframe-hold-linear-in-filled
keyframe-hold-linear-out
keyframe-hold-linear-out-filled
Key icon in other icon sets
Key icon FAQ
Is the Key icon free for commercial use?
Yes. Boxicons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the Key icon in React?
Install @iconify/react and render <Icon icon="boxicons:key" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Key icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/boxicons/key.svg" alt="Key icon">, or paste the SVG code inline to style it with CSS.