To make something clean and hygienic, especially by removing dirt or harmful microorganisms. The hospital staff sanitize the equipment after each use to prevent infections.
To alter something to make it more acceptable or less offensive, often by removing or modifying parts considered inappropriate. The editor decided to sanitize the article before publication to avoid controversy.
Computing: to remove or neutralize sensitive or malicious data from digital content or user input to prevent security vulnerabilities. Developers must sanitize user input to prevent SQL injection attacks.