import React, { useState, useRef, useEffect, useMemo } from 'react'; import { createRoot } from 'react-dom/client'; import { HashRouter as Router, Routes, Route, Link, useLocation } from 'react-router-dom'; // --- CONFIGURATIONS --- const API_BASE_URL = 'https://your-api-domain.com'; // Replace with your FastAPI Cloud Run URL interface ToolConfig { id: string; name: string; ext: string; h1: string; description: string; content: string; } const TOOL_CONFIGS: Record = { pdf: { id: 'pdf', name: 'PDF', ext: '.pdf', h1: 'Unlock PDF Password Online - Free & Secure Removal', description: 'Instantly remove password protection from your PDF files. 100% legal, no file storage, and processed in secure ephemeral memory.', content: `

The Secure Way to Unlock PDF Files

Managing password-protected documents is a routine task in modern business. However, once a file has been securely transmitted, the password often becomes an unnecessary friction point. SecurePass Removr provides a high-performance utility to strip these passwords, allowing for seamless archiving and sharing within your authorized team.

Legal & Secure Compliance

This tool is designed for users who possess the legal right to their documents and know the existing password. We do NOT provide password cracking, bypassing, or hacking services. Our mission is to provide a clean, secure environment for legitimate document management.

Step-by-Step Guide to Removing PDF Passwords

  1. Upload your protected PDF file (Max 50MB).
  2. Enter the correct password for the document.
  3. Click 'Remove Password' and wait for our ephemeral engine to process the file.
  4. Download your unlocked document. It will be deleted from our temporary cache within 60 minutes.

FAQ

Does this store my files?

No. Your files are processed in volatile RAM. A temporary download link is provided, and the source is wiped immediately. The result is permanently deleted from our encrypted bucket after 1 hour.

` }, excel: { id: 'excel', name: 'Excel', ext: '.xlsx, .xls', h1: 'Unlock Excel Spreadsheet Password Online', description: 'Remove workbook and sheet protection from Excel files instantly. Perfect for analysts and financial teams.', content: `

Professional Excel Password Management

Excel spreadsheets often contain sensitive financial data. When protection is no longer needed, SecurePass Removr allows you to remove the "Open" password or editing restrictions in seconds. This utility is ideal for automating data pipelines that cannot handle password prompts.

Workflow Optimization

If your team has inherited a password-protected archive and you possess the credentials, using our tool ensures you can convert those documents into an "Open" format for better accessibility and indexing in your cloud storage solutions.

` }, word: { id: 'word', name: 'Word', ext: '.docx, .doc', h1: 'Remove Password from Word Document Online', description: 'Get full access to your Word documents. Strip opening and editing passwords securely with 100% layout retention.', content: `

Unrestricted Word Document Access

Microsoft Word documents are the standard for corporate communication. SecurePass Removr ensures that your document layout, fonts, and embedded images remain perfectly intact while removing the security layer. We support all modern .docx and legacy .doc formats.

` }, zip: { id: 'zip', name: 'ZIP', ext: '.zip, .7z', h1: 'Unlock ZIP Archive Password Online', description: 'Remove password protection from ZIP and 7Z archives. Fast extraction and re-packing without security.', content: `

Streamline Your Archives

Password-protected ZIP files are excellent for transit but difficult for long-term searchable storage. Our tool uses professional p7zip logic to decrypt your archive with the provided password and re-archive it as a standard open ZIP file.

` } }; // --- COMPONENTS --- const Navbar = () => { const [isOpen, setIsOpen] = useState(false); return ( ); }; const Footer = () => ( ); const FileUploader = ({ toolName, acceptedFileTypes }: { toolName: string, acceptedFileTypes: string }) => { const [file, setFile] = useState(null); const [password, setPassword] = useState(''); const [status, setStatus] = useState<'idle' | 'processing' | 'done' | 'error'>('idle'); const [error, setError] = useState(''); const [downloadUrl, setDownloadUrl] = useState(null); const fileInputRef = useRef (null); const handleUpload = async () => { if (!file || !password) { setError('Please select a file and enter the password.'); return; } setStatus('processing'); setError(''); const formData = new FormData(); formData.append('file', file); formData.append('password', password); try { const response = await fetch(`${API_BASE_URL}/api/unlock`, { method: 'POST', body: formData }); if (!response.ok) { const d = await response.json(); throw new Error(d.detail || 'Processing failed.'); } const blob = await response.blob(); setDownloadUrl(window.URL.createObjectURL(blob)); setStatus('done'); } catch (err: any) { setStatus('error'); setError(err.message || 'An error occurred.'); } }; return (

Upload {toolName} File

Legitimate removal only. Password required.

{status === 'done' ? (

Success!

Download File
) : ( <>
fileInputRef.current?.click()} className={`border-2 border-dashed rounded-xl p-10 text-center cursor-pointer transition ${file ? 'border-indigo-500 bg-indigo-50' : 'border-slate-300 hover:border-indigo-400'}`}> setFile(e.target.files?.[0] || null)} className="hidden" accept={acceptedFileTypes} />

{file ? file.name : `Click to select ${toolName} file`}

Limit 50MB

setPassword(e.target.value)} placeholder="Enter password..." className="w-full p-4 border rounded-xl focus:ring-2 focus:ring-indigo-500 outline-none" />
{error &&

{error}

} )}
); }; // --- PAGES --- const HomePage = () => (

Unlock Your Documents
The Professional Way

Safe, secure, and ephemeral password removal for PDF, Office, and ZIP files. We never log passwords or store your data.

{Object.values(TOOL_CONFIGS).map(t => (

Unlock {t.name}

))}

Bank-Grade SSL

Every byte is encrypted in transit and handled in ephemeral, sandboxed memory stacks.

Auto-Wipe Policy

Files and result links are permanently deleted after 60 minutes. Zero permanent storage footprint.

Legal & Private

We provide a utility, not a exploit. We require the password and respect document integrity.

); const ToolPage = ({ config }: { config: ToolConfig }) => { useEffect(() => window.scrollTo(0, 0), [config.id]); return (

{config.h1}

{config.description}

{/* AdSense Placement Area */}
Advertisement Block
); }; // --- APP COMPONENT --- const App = () => { return (
} /> {Object.values(TOOL_CONFIGS).map(t => ( } /> ))}

Privacy Policy

We process files in RAM. No storage. No logging.

} />

Terms of Service

Legal use only. Correct password required.

} />