Skip to main content

Mask text

Hide most of a text behind a character, keeping the first or last few, e.g. a card number as *********1111 or an e-mail as a@example.com.

Command in the String toolkit · id ooa.string/mask · 6 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesText to mask.
Keep lastNumberNo4Characters to keep visible at the end.
Keep firstNumberNo0Characters to keep visible at the start.
Mask characterStringNo*The character that hides the rest.
Keep separatorsBooleanNotrueLeave spaces, dashes and dots as they are (4111 1111 1111 1111 becomes **** **** **** 1111).
It is an e-mail addressBooleanNofalseMask only the part before the @, keeping its first character.

Outputs​

OutputTypeWhat it is
resultStringThe masked text.