Free plan

Password ZIP

Pack files into a ZIP that needs a password to open
POST
/v1/documents/archive-protect

About this tool

This tool puts files into a ZIP that is locked with a password you choose. The strong AES-256 lock is the default. A weaker, older lock is available for programs that cannot read AES. Windows Explorer and the macOS built-in tool cannot open the AES kind, but programs like 7-Zip can. Keep the password safe, because it cannot be recovered.
For example, you lock a ZIP of personal documents with a password before e-mailing it.

How to use it

  1. Choose this tool.
  2. Add the files you want to lock.
  3. Type the password.
  4. If needed, choose the type of lock, the folder name and file names inside the ZIP.
  5. Press Generate, then download the ZIP.

What you get back

You get one ZIP file that asks for your password when someone opens it. You can download it.
GOOD TO KNOW
The file names stay readable: only the contents are encrypted. Up to 500 MB in all. Counts as one document.
TEST IT LIVE

Try Password ZIP in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/archive-protect
Tool ID
documents.archive-protect
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/archive-protect" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -F 'password=correct horse battery staple' \
  -F 'encryption=aes256' \
  -F 'compression=deflate'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.archiveProtect({
    "files": 'document.pdf',
    "password": "correct horse battery staple",
    "encryption": "aes256",
    "compression": "deflate"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->archiveProtect([
    'files' => 'document.pdf',
    'password' => 'correct horse battery staple',
    'encryption' => 'aes256',
    'compression' => 'deflate',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Pack files into a ZIP that needs a password to open: WinZip AES-256 (default), AES-192, AES-128, or classic ZipCrypto for programs that cannot read AES.

Password ZIP works from text and settings, so no file is needed. The required inputs are password.

Password ZIP is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/archive-protect with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.