Lock icon
ei:lock
The Lock icon (ei:lock) is a free SVG icon from the Evil Icons set by Alexander Madyankin and Roman Shamin. It is drawn on a 50 × 50 grid. Evil Icons 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.
- Icon set
- Evil Icons
- Author
- Alexander Madyankin and Roman Shamin
- License
- MIT
- Size
- 50 × 50
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><path fill="currentColor" d="M34 23h-2v-4c0-3.9-3.1-7-7-7s-7 3.1-7 7v4h-2v-4c0-5 4-9 9-9s9 4 9 9z"/><path fill="currentColor" d="M33 40H17c-1.7 0-3-1.3-3-3V25c0-1.7 1.3-3 3-3h16c1.7 0 3 1.3 3 3v12c0 1.7-1.3 3-3 3M17 24c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h16c.6 0 1-.4 1-1V25c0-.6-.4-1-1-1z"/><circle cx="25" cy="28" r="2" fill="currentColor"/><path fill="currentColor" d="M25.5 28h-1l-1 6h3z"/></svg>How to use the Lock icon
React
import { Icon } from "@iconify/react";
<Icon icon="ei:lock" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="ei:lock" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="ei:lock" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[ei--lock]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/ei -->
<div class="i-ei:lock"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="ei:lock"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/ei/lock.svg" alt="Lock icon" width="24" height="24">Lock icon in other icon sets
Lock icon FAQ
Is the Lock icon free for commercial use?
Yes. Evil Icons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the Lock icon in React?
Install @iconify/react and render <Icon icon="ei:lock" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Lock icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/ei/lock.svg" alt="Lock icon">, or paste the SVG code inline to style it with CSS.