Export size24px

 

App.jsx
import { Lock } from "fmicon-react";

<Lock size={24} variant="broken" strokeWidth={1} />

Props

PropTypeDefaultDescription
sizenumber | string24Width and height in pixels
variant"linear" | "bold" | …linearAny of the 8 styles, plus glass-light for light backgrounds
colorstringcurrentColorAny CSS colour; inherits the text colour by default
strokeWidthnumber1.5Line weight for linear, twotone, broken and duotone
...propsSVG attributes–className, aria-label, onClick and the rest

What is the Lock Icon?

This lock icon shows a closed padlock with its shackle pressed down into the body. It signals that something is secured or restricted: a private album, a password field, a premium feature behind a plan, an encrypted chat or a setting that only an admin can change.

A shut padlock means protected, private or not available to you right now, and context decides which. Browsers taught people to see it as a sign of a secure connection, though most now show it less prominently. The open padlock means unlocked or editable, a shield means protection in general, and a key means signing in or credentials. On a toggle, the closed lock should show the current state, not the action.

When to Use the Lock Icon

  • Sign-in form: sits inside the password input, next to the toggle that shows or hides the characters.
  • Photo app: marks the hidden album that needs face recognition or a passcode to open.
  • SaaS feature list: shows which tools need an upgrade, with the plan name revealed on hover.
  • Document sharing dialog: indicates a file restricted to named people rather than anyone with the link.

The Lock Icon in Broken Style

Broken icons leave small, deliberate gaps in the stroke. The result feels hand-drawn and airy, and it softens an interface without making it look unfinished.

Best for: playful brands, landing pages and illustrations.

The same icon also comes in linear, outline, bold, bulk, twotone, glass and duotone. See every icon in this look on the free broken icons page.

How to Use the Lock Icon

  1. Customise it. Pick a stroke weight, size and colour on the left. Thin (1 px) looks best at large sizes, Regular (1.5 px) is the default.
  2. Copy or download. Copy the SVG, or download SVG, PNG or WebP at any size from 16 to 512 px.
  3. Drop it into code. Choose React, React Native, Vue, Svelte, Angular or Flutter above and copy the ready-made LockIcon component.
  4. Label it. If the icon is the only thing in a button, give it a name for screen readers: aria-label="Lock item". If text sits next to it, use aria-hidden="true" instead.

Design Tips for the Lock Icon

  • When the lock marks a paid feature, say so in text, such as Pro plan, because people may think the feature is broken or forbidden.
  • Keep the gap inside the shackle clear at 16 px; if it fills in, the padlock starts to look like a shopping bag.
  • On a lock toggle, update both the glyph and the label between Lock and Unlock so the current state is never ambiguous.

Icons That Work Well with Lock

Browse all security icons

Lock Icon FAQ

No, they are the same symbol: people use both names interchangeably, and both mean secured or restricted. Some sets draw a door lock or keyhole for physical access, but in software the padlock is the standard for privacy and protection.

A lock suits privacy and password sections, but a shield usually reads better as the symbol for a whole security settings area. Use the shield for the section title and the lock for individual items, such as passwords, two-step sign-in and app passcodes.

Yes. The lock icon is one of 891 free, open-source icons you can use in personal and commercial work, including client projects and apps you sell. The packages are MIT licensed; keep the licence notice if you redistribute the icon files.

SVG, PNG and WebP, at any size from 16 to 512 pixels. You can also copy it as JSX or as a ready-made component for React, React Native, Vue, Svelte, Angular and Flutter, with your stroke weight and colour already applied.