<!DOCTYPE html>
<html lang="en">
<head>
<title>Free AVIF to PNG Converter - Quick & Easy Online Tool</title>
<meta name="description"
content="Easily convert AVIF to PNG online with our fast, secure, and free tool. No downloads or sign-ups required – perfect for quick conversions on any device!">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="/static/logo.png" type="image/png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://iformat.io/avif-to-png"/>
<meta name="yandex-verification" content="b06651e96519752b" />
<input type="hidden" name="csrfmiddlewaretoken" value="aOiuIGVb0wuVjTvL9rWDuAwO4i57O5jTUjjhYe6H9TyQgnH7kfysna1GZWJQk1iB">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-K5PN90MCSZ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-K5PN90MCSZ');
</script>
<meta name="msvalidate.01" content="5CAE4943CEBF239CD78C1EE61E777102" />
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<link href="/static/styles/other_styles.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Inter:400,500,600,700&display=swap" rel="stylesheet">
<style>
.bg-random {
background-color: hsl(calc(360 * var(--random)), 70%, 80%);
}
</style>
</head>
<body class="antialiased text-gray-800 font-inter">
<header class="bg-white shadow sticky top-0 z-50">
<div class="container mx-auto px-6 py-4 flex items-center justify-between">
<!-- Logo -->
<div class="flex items-center">
<a href="/" class="flex items-center">
<img src="../static/logo.svg" alt="iformat.io Logo" class="h-8 w-auto mr-2">
<span class="text-3xl font-medium text-blue-600">iformat.io</span>
</a>
</div>
<!-- Mobile Menu Button -->
<button class="text-gray-800 md:hidden focus:outline-none" id="mobile-menu-button">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
<!-- Navigation for larger screens -->
<div class="hidden md:flex font-medium items-center space-x-6" id="navbar">
<div class="container mx-auto flex items-center space-x-6">
<!-- Converter Tools Dropdown -->
<div class="relative group">
<button class="flex items-center text-gray-800 hover:text-blue-600 font-medium focus:outline-none">
Converter Tools
<!-- Dropdown Icon -->
<svg class="ml-1 w-4 h-4" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd"></path>
</svg>
</button>
<!-- Dropdown Content for Converters -->
<div class="absolute right-0 mt-0 w-48 bg-white rounded-lg shadow-lg hidden group-hover:block transition-opacity duration-300 ease-in-out opacity-0 group-hover:opacity-100 z-10">
<div class="py-2">
<a href="/image-converter"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Image
Converter</a>
<a href="/video-converter"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Video
Converter</a>
<a href="/audio-converter"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Audio
Converter</a>
<a href="/document-converter"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Document
Converter</a>
</div>
</div>
</div>
<!-- Compressor Tools Dropdown -->
<div class="relative group">
<button class="flex items-center text-gray-800 hover:text-blue-600 font-medium focus:outline-none">
Compressor Tools
<!-- Dropdown Icon -->
<svg class="ml-1 w-4 h-4" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd"></path>
</svg>
</button>
<!-- Dropdown Content for Compressors -->
<div class="absolute right-0 mt-0 w-48 bg-white rounded-lg shadow-lg hidden group-hover:block transition-opacity duration-300 ease-in-out opacity-0 group-hover:opacity-100 z-10">
<div class="py-2">
<a href="/image-compressor"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Image
Compressor</a>
<a href="/document-compressor"
class="block px-4 py-2 text-gray-800 hover:bg-gray-100 hover:text-blue-600">Document
Compressor</a>
</div>
</div>
</div>
<!-- Image Resizer Link with Icon -->
<a href="/image-resizer" class="flex items-center text-gray-800 hover:text-blue-600 font-medium">
Image Resizer
</a>
<a href="/time-converter" class="flex items-center text-gray-800 hover:text-blue-600 font-medium">
Time Converter
</a>
<a href="/blog" class="flex items-center text-gray-800 hover:text-blue-600 font-medium">
Blog
</a>
</div>
<!-- Search Box -->
<div class="relative hidden md:block">
<input id="search-bar" type="text" placeholder="Search tools..."
class="border border-gray-300 rounded-full px-4 py-1 pl-10 focus:outline-none focus:border-blue-500"
oninput="searchAppsSubGroups()">
<svg class="w-4 h-4 absolute left-3 top-2.5 text-gray-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M12.9 14.32a8 8 0 111.414-1.414l5.387 5.387a1 1 0 01-1.414 1.414l-5.387-5.387zM8 14a6 6 0 100-12 6 6 0 000 12z"
clip-rule="evenodd"/>
</svg>
<!-- Search Results Container -->
<div id="search-results"
class="absolute left-0 mt-1 bg-white border border-gray-300 rounded-md w-full hidden z-20">
<!-- Search results will be populated here -->
</div>
</div>
<!-- Language Switcher -->
</div>
</div>
<!-- Mobile Navigation Menu -->
<div class="md:hidden hidden" id="mobile-menu">
<div class="flex flex-col px-6 pt-4 pb-6 space-y-4"> <!-- Applied flex-col for vertical alignment -->
<a href="/image-converter" class="text-gray-800 hover:text-blue-600">Image Converter</a>
<a href="/video-converter" class="text-gray-800 hover:text-blue-600">Video Converter</a>
<a href="/audio-converter" class="text-gray-800 hover:text-blue-600">Audio Converter</a>
<a href="/image-compressor" class="text-gray-800 hover:text-blue-600">Image Compressor</a>
<a href="/document-converter" class="text-gray-800 hover:text-blue-600">Document Converter</a>
<a href="/document-compressor" class="text-gray-800 hover:text-blue-600">Document Compressor</a>
<a href="/time-converter" class="text-gray-800 hover:text-blue-600">Time Converter</a>
<a href="/blog" class="text-gray-800 hover:text-blue-600">Blog</a>
</div>
</div>
</header>
<script>
function searchAppsSubGroups() {
const query = document.getElementById('search-bar').value.trim();
const resultsContainer = document.getElementById('search-results');
if (query.length > 1) {
fetch(`/search/?q=${encodeURIComponent(query)}`)
.then(response => {
if (!response.ok) {
throw new Error(`Error: ${response.status}`);
}
return response.json();
})
.then(data => {
const results = data.results || [];
resultsContainer.innerHTML = '';
if (results.length > 0) {
results.forEach(result => {
const item = document.createElement('a');
item.href = result.url || '#';
item.className = 'block px-4 py-2 text-gray-800 hover:bg-blue-100 hover:text-blue-700';
item.innerText = result.name || 'No name available';
resultsContainer.appendChild(item);
});
resultsContainer.classList.remove('hidden');
} else {
resultsContainer.innerHTML = '<p class="px-4 py-2 text-gray-800">No results found.</p>';
resultsContainer.classList.remove('hidden');
}
})
.catch(error => {
console.error('Error fetching search results:', error);
resultsContainer.innerHTML = '<p class="px-4 py-2 text-red-600">An error occurred. Please try again.</p>';
resultsContainer.classList.remove('hidden');
});
} else {
resultsContainer.classList.add('hidden');
}
}
document.addEventListener('click', function (event) {
const searchBar = document.getElementById('search-bar');
const searchResults = document.getElementById('search-results');
if (searchBar && searchResults && !searchBar.contains(event.target) && !searchResults.contains(event.target)) {
searchResults.classList.add('hidden');
}
});
// Toggle the mobile menu visibility
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden'); // Show or hide the mobile menu
});
// Close the mobile menu when clicking outside
document.addEventListener('click', function (event) {
if (!mobileMenu.contains(event.target) && !mobileMenuButton.contains(event.target)) {
mobileMenu.classList.add('hidden');
}
});
/*
// Language Switcher functionality
const langButton = document.getElementById('lang-button');
const langMenu = document.getElementById('lang-menu');
langButton.addEventListener('click', (e) => {
e.stopPropagation();
langMenu.classList.toggle('hidden');
langButton.setAttribute('aria-expanded', !langMenu.classList.contains('hidden'));
});
// Close the language dropdown when clicking outside
window.addEventListener('click', () => {
langMenu.classList.add('hidden');
langButton.setAttribute('aria-expanded', 'false');
});
// Handle language selection
const langLinks = document.querySelectorAll('#lang-menu a');
langLinks.forEach(link => {
link.addEventListener('click', function (e) {
e.preventDefault();
const selectedLanguage = this.getAttribute('data-lang');
const currentPath = window.location.pathname;
let newUrl = `/${selectedLanguage}${currentPath}`;
// Remove leading language code if exists
const pathSegments = currentPath.split('/');
if (pathSegments[1] && pathSegments[1].length === 2) {
pathSegments.splice(1, 1);
newUrl = `/${selectedLanguage}/${pathSegments.slice(1).join('/')}`;
}
// Redirect to the new URL
window.location.href = newUrl;
});
}); */
</script>
<div class="container mx-auto py-2 px-6">
<nav>
<ol class="list-reset flex items-center space-x-2 text-sm md:text-base text-gray-600">
<!-- Check if it's the last breadcrumb item to apply different styling -->
<li>
<a href="/"
class="text-blue-600 hover:text-blue-800 font-medium">Home</a>
</li>
<li>
<span class="text-gray-500">›</span>
</li>
<!-- Check if it's the last breadcrumb item to apply different styling -->
<li>
<a href="image-converter"
class="text-blue-600 hover:text-blue-800 font-medium">Image Converter</a>
</li>
<li>
<span class="text-gray-500">›</span>
</li>
<!-- Check if it's the last breadcrumb item to apply different styling -->
<li>
<a href="avif-converter"
class="text-blue-600 hover:text-blue-800 font-medium">AVIF Converter</a>
</li>
<li>
<span class="text-gray-500">›</span>
</li>
<!-- Check if it's the last breadcrumb item to apply different styling -->
<li class="text-gray-700 font-medium">
AVIF to PNG Converter
</li>
</ol>
</nav>
</div>
<main class="py-10 bg-gradient-to-r from-blue-100 to-blue-200">
<div class="container mx-auto px-6">
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-center mb-4 sm:mb-6 lg:mb-8 text-gray-800">AVIF to PNG Converter</h1>
<p class="text-center text-base sm:text-lg lg:text-xl mb-8 sm:mb-12 text-gray-700 max-w-3xl mx-auto">Convert AVIF to PNG with our free online tool. It’s fast, secure, and simple to use – ideal for converting AVIF files to PNG format with no software needed.</p>
<div class="bg-white rounded-2xl shadow-md p-6 sm:p-8 max-w-full lg:max-w-4xl mx-auto">
<div id="drop-area" class="rounded-xl p-12 sm:p-16 lg:p-20 text-center border-2 border-dashed border-gray-300 hover:border-blue-500 transition-colors">
<button id="browse-btn" class="bg-blue-500 text-white font-semibold text-lg px-8 py-3 rounded-xl hover:bg-blue-600 transition duration-300">
Browse Files
</button>
<input id="file-upload" type="file" class="hidden" multiple/>
</div>
<div id="file-list" class="mt-6 sm:mt-8 hidden">
<h3 class="font-semibold text-lg mb-4">Selected Files:</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-300">
<thead class="bg-gray-100">
<tr>
<th scope="col" class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
File Name
</th>
<th scope="col" class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
Size
</th>
<th scope="col" class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
Convert To
</th>
</tr>
</thead>
<tbody id="file-table-body" class="bg-white divide-y divide-gray-300">
<!-- File rows will be inserted here -->
</tbody>
</table>
</div>
<div class="flex flex-col sm:flex-row justify-between items-center mt-6">
<button id="add-more-files-btn" class="bg-gray-200 text-gray-900 px-4 py-2 rounded-full hover:bg-gray-500 hover:text-white transition duration-300 mb-2 sm:mb-0">
Add More Files
</button>
<div class="flex items-center space-x-2 sm:space-x-4 mt-4 sm:mt-0">
<label for="convert-all-format" class="text-sm font-medium">Convert all to:</label>
<div id="convert-all-format">
<!-- Dropdown content -->
</div>
</div>
<button id="convert-all-btn" class="w-full sm:w-auto bg-blue-500 text-white py-2 px-6 rounded-lg hover:bg-blue-600 transition duration-300 font-semibold text-lg">
Convert All Files
</button>
</div>
</div>
<div id="conversion-results" class="mt-6 sm:mt-8 hidden">
<h3 class="font-semibold text-lg mb-4">Converted Files:</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-300">
<thead class="bg-gray-100">
<tr>
<th scope="col" class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
File Name
</th>
<th scope="col"
class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
File Size
</th>
<th scope="col" class="px-6 py-3 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider">
Download
</th>
</tr>
</thead>
<tbody id="converted-files-list" class="bg-white divide-y divide-gray-300">
<!-- Converted file links will be inserted here -->
</tbody>
</table>
</div>
<div class="flex flex-col sm:flex-row justify-between mt-6">
<a id="convert-again-btn" href="/" class="bg-blue-500 text-white px-6 py-2 rounded-lg hover:bg-blue-600 transition duration-300 text-center mb-2 sm:mb-0">
Convert Again
</a>
<a id="zip-download" href="#" class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition duration-300 text-center">
Download All (ZIP)
</a>
</div>
</div>
<div id="share-and-support" class="mt-6 sm:mt-8 hidden bg-white p-4 sm:p-6 rounded-lg">
<div class="flex justify-center mb-4">
<p class="font-semibold text-lg">Share your results:</p>
</div>
<div class="flex justify-center space-x-2 sm:space-x-4">
<a href="https://www.facebook.com/sharer/sharer.php?u=https://iformat.io" class="bg-blue-500 text-white px-4 py-2 rounded-full hover:bg-blue-600 transition duration-300" target="_blank">
Share on Facebook
</a>
<a href="https://twitter.com/intent/tweet?url=https://iformat.io&text=Check%20out%20this%20website!" class="bg-blue-400 text-white px-4 py-2 rounded-full hover:bg-blue-500 transition duration-300" target="_blank">
Share on Twitter
</a>
<a href="https://buymeacoffee.com/iformat" target="_blank" class="bg-yellow-500 text-white px-4 py-2 rounded-full hover:bg-yellow-600 transition duration-300">
Buy Me a Coffee
</a>
</div>
</div>
</div>
</div>
</main>
<script src="/static/CACHE/js/output.58ea25e804e9.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const dropArea = document.getElementById('drop-area');
const fileInput = document.getElementById('file-upload');
const browseBtn = document.getElementById('browse-btn');
const fileList = document.getElementById('file-list');
const fileTableBody = document.getElementById('file-table-body');
const convertAllBtn = document.getElementById('convert-all-btn');
const conversionResults = document.getElementById('conversion-results');
const convertedFilesList = document.getElementById('converted-files-list');
const zipDownload = document.getElementById('zip-download');
// Parse the formats JSON from Django
const conversionFormats = JSON.parse('{\u0022Audio\u0022: [\u0022flac\u0022, \u0022m4a\u0022, \u0022m4r\u0022, \u0022mp3\u0022, \u0022ogg\u0022, \u0022wav\u0022, \u0022wma\u0022], \u0022Document\u0022: [\u0022pdf\u0022], \u0022Image\u0022: [\u0022avif\u0022, \u0022bmp\u0022, \u0022heic\u0022, \u0022heif\u0022, \u0022jfif\u0022, \u0022jpeg\u0022, \u0022jpg\u0022, \u0022png\u0022, \u0022svg\u0022, \u0022tif\u0022, \u0022tiff\u0022, \u0022webp\u0022], \u0022Video\u0022: [\u0022avi\u0022, \u0022mkv\u0022, \u0022mov\u0022, \u0022mp4\u0022, \u0022webm\u0022]}');
function changeAll(format, category) {
if (format && category) {
const allConvertedFiles = fileTableBody.querySelectorAll('tr');
allConvertedFiles.forEach((fileRow, index) => {
const convertToSelect = dds[index];
convertToSelect.setValue(format, category); // Set the selected format for each file
});
}
}
const convertAllFormatSelect = new FormatDropdown('convert-all-format', conversionFormats, (format, category) => {
console.log('selected: ' + format);
changeAll(format, category);
});
// document.getElementById('convert-all-format');
let filesArray = [];
let dds = [];
const addMoreFilesBtn = document.getElementById('add-more-files-btn');
addMoreFilesBtn.addEventListener('click', () => {
fileInput.click(); // Trigger the file input click event
});
// Set the default value for the "Convert all to" dropdown
/*
if (endExtn) {
convertAllFormatSelect.setValue(endExtn);
}
*/
browseBtn.addEventListener('click', () => fileInput.click());
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
dropArea.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, unhighlight, false);
});
function highlight() {
dropArea.classList.add('bg-blue-100');
}
function unhighlight() {
dropArea.classList.remove('bg-blue-100');
}
dropArea.addEventListener('drop', handleDrop, false);
function handleDrop(e) {
const dt = e.dataTransfer;
const files = dt.files;
handleFiles(files);
}
fileInput.addEventListener('change', function () {
handleFiles(this.files);
});
function handleFiles(files) {
if (files.length > 0) {
fileList.classList.remove('hidden');
convertAllBtn.classList.remove('hidden');
dropArea.classList.add('hidden');
const currentIndex = filesArray.length; // Get the current length of the filesArray
Array.from(files).forEach((file, index) => {
const actualIndex = currentIndex + index; // Calculate the actual index for each file
filesArray.push(file);
appendFileRow(file, actualIndex);
});
}
updateFileListVisibility();
}
function appendFileRow(file, index) {
const row = document.createElement('tr');
// Parse the formats JSON from Django
const conversionFormats = JSON.parse('{\u0022Audio\u0022: [\u0022flac\u0022, \u0022m4a\u0022, \u0022m4r\u0022, \u0022mp3\u0022, \u0022ogg\u0022, \u0022wav\u0022, \u0022wma\u0022], \u0022Document\u0022: [\u0022pdf\u0022], \u0022Image\u0022: [\u0022avif\u0022, \u0022bmp\u0022, \u0022heic\u0022, \u0022heif\u0022, \u0022jfif\u0022, \u0022jpeg\u0022, \u0022jpg\u0022, \u0022png\u0022, \u0022svg\u0022, \u0022tif\u0022, \u0022tiff\u0022, \u0022webp\u0022], \u0022Video\u0022: [\u0022avi\u0022, \u0022mkv\u0022, \u0022mov\u0022, \u0022mp4\u0022, \u0022webm\u0022]}');
// Build option groups for the select element
let optionGroupsHTML = '<option value="">Select</option>';
Object.keys(conversionFormats).forEach(category => {
optionGroupsHTML += `<optgroup label="${category}">`;
conversionFormats[category].forEach(format => {
optionGroupsHTML += `<option value="${format}">${format.toUpperCase()}</option>`;
});
optionGroupsHTML += '</optgroup>';
});
// Get the select element and populate it
//const selectElement = document.getElementById('convert-all-format');
//selectElement.innerHTML = optionGroupsHTML;
// Construct the row HTML
row.innerHTML = `
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">${file.name}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-500">${formatFileSize(file.size)}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div id="dd-${index}"></div>
<input id="input-${index}" type="hidden" class=".convert-to'" />
</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="remove-file-btn text-gray-500 hover:text-red-600 transition duration-300">
×
</button>
</td>
`;
fileTableBody.appendChild(row);
// Set the default value for the file row dropdown if applicable
/*
if (endExtn) {
convertToSelect.value = endExtn;
}
*/
const input_index = row.querySelector(`#input-${index}`);
const dd_index = new FormatDropdown(`dd-${index}`, conversionFormats, (format) => {
input_index.value = format;
});
dds.push(dd_index);
// Attach the remove functionality
const removeBtn = row.querySelector('.remove-file-btn');
removeBtn.addEventListener('click', function () {
removeFileRow(row, file);
filesArray.splice(index, 1); // Remove the file from the array
dds.splice(index, 1);
updateIndices(); // Update the indices of remaining rows
});
}
function updateIndices() {
// Update the ids and indices for each row after one is removed
fileTableBody.querySelectorAll('tr').forEach((row, newIndex) => {
const dropdownId = `dd-${newIndex}`;
const inputId = `input-${newIndex}`;
// Update the dropdown and input ids
row.querySelector('[id^="dd-"]').id = dropdownId;
row.querySelector('[id^="input-"]').id = inputId;
// Update the FormatDropdown instance
const ddInstance = dds[newIndex];
ddInstance.updateId(dropdownId); // Assuming the FormatDropdown class has an updateId method
});
}
function removeFileRow(row, file) {
// Remove the file from the array
filesArray = filesArray.filter(f => f !== file);
// Remove the row from the table
row.remove();
// Update visibility of file list
updateFileListVisibility();
}
function updateFileListVisibility() {
if (filesArray.length === 0) {
fileList.classList.add('hidden');
convertAllBtn.classList.add('hidden');
dropArea.classList.remove('hidden');
} else {
fileList.classList.remove('hidden');
convertAllBtn.classList.remove('hidden');
dropArea.classList.add('hidden');
}
}
function formatFileSize(bytes) {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
}
convertAllBtn.addEventListener('click', () => {
const formData = new FormData();
const allFiles = fileTableBody.querySelectorAll('tr');
allFiles.forEach((fileRow, index) => {
const fileName = fileRow.querySelector('.text-sm.font-medium').textContent;
const convertTo = fileRow.querySelector(`#input-${index}`).value;
if (fileName && convertTo) {
formData.append(`file_${index}`, filesArray[index]);
formData.append(`format_${index}`, convertTo);
}
});
// Show loading indicator
convertAllBtn.textContent = 'Converting...';
convertAllBtn.disabled = true;
fetch('/upload_files', {
method: 'POST',
body: formData,
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
if (data.error) {
alert(data.error);
} else {
displayConversionResults(data);
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred during conversion. Please try again.');
})
.finally(() => {
// Reset button state
convertAllBtn.textContent = 'Convert All Files';
convertAllBtn.disabled = false;
});
});
function displayConversionResults(data) {
convertedFilesList.innerHTML = '';
data.uploaded_files.forEach(file => {
const row = document.createElement('tr');
row.innerHTML = `
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">${file.input_name}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-500">${formatFileSize(file.converted_file_size)}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<a href="${file.output_url}" class="text-blue-600 hover:text-blue-800" download>Download</a>
</td>
`;
convertedFilesList.appendChild(row);
});
zipDownload.href = data.zip_file_url;
zipDownload.classList.remove('hidden');
conversionResults.classList.remove('hidden');
// Show the Convert Again button
const convertAgainBtn = conversionResults.querySelector('a[href="/"]');
convertAgainBtn.classList.remove('hidden');
// Show the Share and Support section
const shareAndSupportSection = document.getElementById('share-and-support');
shareAndSupportSection.classList.remove('hidden');
// Hide the selected files section
fileList.classList.add('hidden');
// Hide the Convert All Files button
convertAllBtn.classList.add('hidden');
}
});
</script>
<style>
.star {
cursor: pointer;
font-size: 2rem;
color: #e5e5e5; /* Default star color */
}
.star:hover, .star.selected {
color: #ffcc00; /* Yellow color for selected stars */
}
</style>
<div class="rating-section text-center mt-4 p-6 bg-white shadow-md rounded-lg">
<div class="rating-form">
<h2 class="text-2xl font-semibold mb-4">Rate our AVIF to PNG Converter</h2>
<div class="flex items-center justify-center space-x-4 mt-2" id="rating-value">
<!-- Star Rating Buttons -->
<div class="flex space-x-2">
<button class="star" onclick="rate(1)">★</button>
<button class="star" onclick="rate(2)">★</button>
<button class="star" onclick="rate(3)">★</button>
<button class="star" onclick="rate(4)">★</button>
<button class="star" onclick="rate(5)">★</button>
</div>
<!-- Rating Value and Count -->
<p class="flex items-center space-x-1 text-lg">
<span class="text-xl font-bold">0.0</span>
<span>/ 5</span>
<span>(0 votes)</span>
</p>
</div>
<button id="submit-rating" class="mt-4 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Submit
Rating
</button>
</div>
</div>
<script>
let selectedRating = 0;
const contentId = 107; // Injected from Django context
const contentType = "app"; // Injected from Django context
const ratingUrl = "/rate-content"; // Injected from Django context
// Get the CSRF token from the cookies
function getCookie(name) {
let cookieValue = null;
if (document.cookie && document.cookie !== '') {
const cookies = document.cookie.split(';');
for (let i = 0; i < cookies.length; i++) {
const cookie = cookies[i].trim();
if (cookie.substring(0, name.length + 1) === (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
// CSRF token to include in the request headers
const csrftoken = getCookie('csrftoken');
console.log("CSRF Token:", csrftoken); // Debugging log
// Function to handle star rating selection
function rate(stars) {
selectedRating = stars;
const starButtons = document.querySelectorAll('.star');
starButtons.forEach((star, index) => {
star.classList.toggle('selected', index < stars);
});
document.getElementById('rating-value').innerText = `Rating: ${stars}/5`;
}
// Function to handle rating submission
document.getElementById('submit-rating').addEventListener('click', function () {
if (selectedRating === 0) {
alert("Please select a rating before submitting.");
return;
}
console.log("Submitting rating..."); // Debugging log
console.log("Content Type:", contentType); // Debugging log
console.log("Content ID:", contentId); // Debugging log
console.log("Selected Rating:", selectedRating); // Debugging log
// Send the rating to the backend using Fetch API
fetch(ratingUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrftoken, // Include the CSRF token
},
body: JSON.stringify({
content_type: contentType,
content_id: contentId,
rating: selectedRating
}),
})
.then(response => response.json())
.then(data => {
console.log("Response:", data); // Debugging log
if (data.success) {
// Replace rating form with thank you message
const ratingForm = document.querySelector('.rating-form');
if (ratingForm) {
ratingForm.innerHTML = `
<div class="thank-you-message">
<h2 class="text-2xl font-semibold text-green-600 mb-4">Thank you for your rating!</h2>
<p>We appreciate your feedback.</p>
</div>
`;
}
} else {
alert('There was an issue submitting your rating. Please try again.');
}
})
.catch((error) => {
console.error('Error:', error); // Debugging log
alert('There was an issue submitting your rating. Please try again.');
});
});
</script>
<!-- How to Convert Section -->
<section class="bg-white py-12">
<div class="max-w-4xl mx-auto text-center">
<h2 class="text-4xl font-bold text-blue-600 mb-6">How to Convert AVIF to PNG?</h2>
<p class="text-lg text-gray-700 mb-10">Easily convert your AVIF files to PNG format with our simple three-step process.</p>
<!-- Steps Section -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<!-- Step 1 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition duration-200">
<h3 class="text-xl font-semibold text-blue-600 mb-2">1. Upload Your AVIF Files</h3>
<p class="text-gray-700">Click the “Browse Files” button and select the AVIF files you want to convert. You can upload multiple files at once for batch conversion, saving you time and effort.</p>
</div>
<!-- Step 2 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition duration-200">
<h3 class="text-xl font-semibold text-blue-600 mb-2">2. Convert to PNG Format</h3>
<p class="text-gray-700">After uploading, choose the “Convert All” option to start the conversion process. Our tool will quickly process and convert your AVIF files to high-quality PNG format without losing any details.</p>
</div>
<!-- Step 3 -->
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition duration-200">
<h3 class="text-xl font-semibold text-blue-600 mb-2">3. Download Your PNG Files</h3>
<p class="text-gray-700">Once the conversion is complete, click “Download All” to save your new PNG files to your device. Enjoy seamless file conversion with our user-friendly tool.</p>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section class="bg-gray-50 py-12">
<div class="max-w-4xl mx-auto text-center">
<h2 class="text-3xl font-bold text-gray-800 mb-8">Why Choose Our AVIF to PNG Converter?</h2>
<p class="text-lg text-gray-700 mb-10">Explore the top features that make our AVIF to PNG converter the preferred choice for thousands of users. Enjoy fast, reliable, and secure file conversions every time.</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Feature 1: Fast and Easy -->
<div class="p-6 bg-white rounded-lg shadow-sm hover:shadow-md transition duration-200">
<div class="text-blue-600 mb-4">
<svg class="w-10 h-10 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-gray-800 mb-2">Fast and Easy Conversion</h3>
<p class="text-gray-700">Our AVIF to PNG converter is designed to simplify the file conversion process. Just drag and drop your files, hit “Convert,” and get your converted files in seconds.</p>
</div>
<!-- Feature 2: High-Quality Output -->
<div class="p-6 bg-white rounded-lg shadow-sm hover:shadow-md transition duration-200">
<div class="text-blue-600 mb-4">
<svg class="w-10 h-10 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-gray-800 mb-2">High-Quality PNG Files</h3>
<p class="text-gray-700">Enjoy clear, crisp, and sharp converted files every time. Our tool ensures that the quality of your original AVIF files is maintained throughout the conversion process.</p>
</div>
<!-- Feature 3: Secure and Private -->
<div class="p-6 bg-white rounded-lg shadow-sm hover:shadow-md transition duration-200">
<div class="text-blue-600 mb-4">
<svg class="w-10 h-10 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-gray-800 mb-2">Secure and Private Conversion</h3>
<p class="text-gray-700">We prioritize your privacy. All files are processed securely, and we automatically delete them from our servers after 2 hours. Compress your files worry-free.</p>
</div>
</div>
</div>
</section>
<div class="max-w-4xl mx-auto py-6">
<!-- FAQ Section with Toggle Functionality -->
<div class="space-y-6">
<div class="faq-item rounded-lg shadow overflow-hidden">
<button class="w-full text-left p-6 flex justify-between items-center bg-gray-50 hover:bg-gray-100 transition duration-200 focus:outline-none"
onclick="toggleSection(event)">
<h2 class="text-2xl font-semibold text-blue-600">
What is an AVIF file?
</h2>
<svg class="w-5 h-5 text-blue-600 transform transition-transform duration-300" fill="none"
stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div class="content max-h-0 overflow-hidden transition-all duration-500 ease-in-out">
<div class="p-6 text-gray-800">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<p><span data-preserver-spaces="true">An </span><strong><span data-preserver-spaces="true">AVIF file</span></strong><span data-preserver-spaces="true"> is an image file that stands for AV1 Image File Format. It is a relatively new image format that uses the AV1 (AOMedia Video 1) compression algorithm to create high-quality images with smaller file sizes. AVIF files are becoming popular because they can produce images with better quality than JPEG and even smaller sizes than PNG, making them ideal for web use where quality and speed are essential.</span></p>
<h2><span data-preserver-spaces="true">Key Features of AVIF Files </span></h2>
<ul>
<li><strong><span data-preserver-spaces="true">High Compression Efficiency:</span></strong><span data-preserver-spaces="true"> AVIF files are known for their excellent compression, which means they can reduce file sizes significantly while maintaining high image quality. This benefits websites that need to load images quickly without sacrificing visual quality.</span></li>
<li><strong><span data-preserver-spaces="true">Support for Advanced Features:</span></strong><span data-preserver-spaces="true"> AVIF supports features like high dynamic range (HDR), transparency, and even animations, making it a versatile format for modern web and graphic design needs.</span></li>
<li><strong><span data-preserver-spaces="true">Improved Image Quality:</span></strong><span data-preserver-spaces="true"> AVIF images can deliver better image quality than traditional formats like JPEG, especially in color accuracy and detail, even at smaller file sizes.</span></li>
<li><strong><span data-preserver-spaces="true">Growing Compatibility:</span></strong><span data-preserver-spaces="true"> Although AVIF is a newer format, it </span><span data-preserver-spaces="true">is increasingly supported</span><span data-preserver-spaces="true"> by modern browsers like Chrome, Firefox, and Edge, as well as some image editing tools. However, some older systems may still require conversions to more widely supported formats.</span></li>
</ul>
<h2><span data-preserver-spaces="true">Why Use AVIF Files? </span></h2>
<p><span data-preserver-spaces="true">AVIF files are a great choice when you need high-quality images with smaller file sizes, particularly for use on the web. They offer advanced features like HDR and transparency, making them suitable for various applications. Suppose you need to convert AVIF files to other formats for compatibility reasons. In that case, you can easily </span><a class="editor-rtfLink" href="../../../../../avif-to-png" target="_blank" rel="noopener"><span data-preserver-spaces="true">convert AVIF to PNG</span></a><span data-preserver-spaces="true"> for transparent images or </span><a class="editor-rtfLink" href="../../../../../avif-to-jpg" target="_blank" rel="noopener"><span data-preserver-spaces="true">convert AVIF to JPG</span></a><span data-preserver-spaces="true"> for broader compatibility across devices and platforms.</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function toggleSection(event) {
const button = event.currentTarget;
const content = button.nextElementSibling;
const svgIcon = button.querySelector('svg');
// Toggle max-height for smooth opening/closing of the section
if (content.style.maxHeight && content.style.maxHeight !== '0px') {
content.style.maxHeight = '0px';
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
// Rotate the SVG icon to indicate the expanded state
svgIcon.classList.toggle('rotate-180');
}
</script>
<div class="max-w-4xl mx-auto py-6">
<!-- FAQ Section with Toggle Functionality -->
<div class="space-y-6">
<div class="faq-item rounded-lg shadow overflow-hidden">
<button class="w-full text-left p-6 flex justify-between items-center bg-gray-50 hover:bg-gray-100 transition duration-200 focus:outline-none"
onclick="toggleSection(event)">
<h2 class="text-2xl font-semibold text-blue-600">
What is a PNG file?
</h2>
<svg class="w-5 h-5 text-blue-600 transform transition-transform duration-300" fill="none"
stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div class="content max-h-0 overflow-hidden transition-all duration-500 ease-in-out">
<div class="p-6 text-gray-800">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<p class="text-gray-600 text-lg leading-relaxed">A <strong>PNG file</strong> is a type of image file. PNG stands for Portable Network Graphics. This format was created to be a better, more modern way to store pictures than older formats like GIFs. <strong>PNG images</strong> are popular because they keep the picture quality high and are easy to use and share. One of the best things about PNG files is that they can handle transparency, which means parts of the image can be see-through.</p>
<h2 class="text-xl font-semibold mt-6">Key Features of PNG Images </h2>
<ul class="list-disc list-inside text-gray-600 text-lg leading-relaxed">
<li><strong>High-Quality Images:</strong> PNG files maintain a very high image quality even after being saved and shared many times. This makes them great for detailed images like logos or graphics.</li>
<li><strong>Supports Transparency:</strong> One of the unique features of PNG files is that they can have transparent backgrounds. This is helpful when you want to place an image on top of different backgrounds without any edges showing.</li>
<li><strong>Widely Compatible:</strong> PNG files work on almost all devices and programs. You can open and use PNG images on computers, phones, and the web without problems.</li>
</ul>
<h2 class="text-xl font-semibold mt-6">Why Use PNG Images? </h2>
<p class="text-gray-600 text-lg leading-relaxed">PNG images are a great choice when you need clear, high-quality pictures. They are perfect for images that need to stay sharp and detailed, like logos, icons, or web graphics. PNG files are also ideal if you need a picture with a transparent background. Overall, PNG is a strong and versatile image format that works well for many uses.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function toggleSection(event) {
const button = event.currentTarget;
const content = button.nextElementSibling;
const svgIcon = button.querySelector('svg');
// Toggle max-height for smooth opening/closing of the section
if (content.style.maxHeight && content.style.maxHeight !== '0px') {
content.style.maxHeight = '0px';
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
// Rotate the SVG icon to indicate the expanded state
svgIcon.classList.toggle('rotate-180');
}
</script>
<div class="max-w-4xl mx-auto py-6 space-y-6">
<div class="conversion-item rounded-lg overflow-hidden shadow">
<button class="w-full text-left p-6 flex justify-between items-center bg-gray-50 hover:bg-gray-100 transition duration-200 focus:outline-none"
onclick="toggleSection(event)">
<h2 class="text-2xl font-semibold text-blue-600">
Convert other files to PNG format
</h2>
<svg class="w-5 h-5 text-gray-500 transform transition-transform duration-300" fill="none"
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div class="conversion-list max-h-0 overflow-hidden transition-all duration-500 ease-in-out">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-6">
<h3>
<a href="avif-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to PNG Converter
</a>
</h3>
<h3>
<a href="bmp-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
BMP to PNG Converter
</a>
</h3>
<h3>
<a href="heic-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
HEIC to PNG Converter
</a>
</h3>
<h3>
<a href="heif-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
HEIF to PNG Converter
</a>
</h3>
<h3>
<a href="jfif-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
JFIF to PNG Converter
</a>
</h3>
<h3>
<a href="jpeg-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
JPEG to PNG Converter
</a>
</h3>
<h3>
<a href="jpg-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
JPG to PNG Converter
</a>
</h3>
<h3>
<a href="svg-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
SVG to PNG Converter
</a>
</h3>
<h3>
<a href="tiff-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
TIFF to PNG Converter
</a>
</h3>
<h3>
<a href="tif-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
TIF to PNG Converter
</a>
</h3>
<h3>
<a href="webp-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
WEBP to PNG Converter
</a>
</h3>
</div>
</div>
</div>
</div>
<!-- Section for converting a specific file type to other formats -->
<div class="max-w-4xl mx-auto py-6 space-y-6">
<div class="conversion-item rounded-lg overflow-hidden shadow">
<button class="w-full text-left p-6 flex justify-between items-center bg-gray-50 hover:bg-gray-100 transition duration-200 focus:outline-none"
onclick="toggleSection(event)">
<h2 class="text-2xl font-semibold text-blue-600">
Convert your AVIF files to other formats
</h2>
<svg class="w-5 h-5 text-gray-500 transform transition-transform duration-300" fill="none"
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div class="conversion-list max-h-0 overflow-hidden transition-all duration-500 ease-in-out">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-6">
<h3>
<a href="avif-to-bmp"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to BMP Converter
</a>
</h3>
<h3>
<a href="avif-to-heic"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to HEIC Converter
</a>
</h3>
<h3>
<a href="avif-to-heif"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to HEIF Converter
</a>
</h3>
<h3>
<a href="avif-to-jfif"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to JFIF Converter
</a>
</h3>
<h3>
<a href="avif-to-jpeg"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to JPEG Converter
</a>
</h3>
<h3>
<a href="avif-to-jpg"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to JPG Converter
</a>
</h3>
<h3>
<a href="avif-to-pdf"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to PDF Converter
</a>
</h3>
<h3>
<a href="avif-to-png"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to PNG Converter
</a>
</h3>
<h3>
<a href="avif-to-svg"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to SVG Converter
</a>
</h3>
<h3>
<a href="avif-to-tif"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to TIF Converter
</a>
</h3>
<h3>
<a href="avif-to-tiff"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to TIFF Converter
</a>
</h3>
<h3>
<a href="avif-to-webp"
class="block text-xl text-semibold text-gray-800 hover:underline hover:text-blue-500 transition duration-200">
AVIF to WEBP Converter
</a>
</h3>
</div>
</div>
</div>
</div>
<script>
document.querySelectorAll('.conversion-list').forEach(list => {
list.style.maxHeight = list.scrollHeight + "px";
});
function toggleSection(event) {
const button = event.currentTarget;
const list = button.nextElementSibling;
const svgIcon = button.querySelector('svg');
if (list.style.maxHeight && list.style.maxHeight !== '0px') {
list.style.maxHeight = '0px';
} else {
list.style.maxHeight = list.scrollHeight + "px";
}
svgIcon.classList.toggle('rotate-180');
}
</script>
<div class="max-w-4xl mx-auto px-6 py-12">
<h2 class="text-3xl font-bold text-center text-blue-600 mb-8">
Frequently Asked Questions
</h2>
<div class="divide-y divide-gray-200">
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
Can I convert AVIF to PNG in web browsers?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
Our software allows you to convert AVIF to PNG directly from web browsers without installing additional software.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
Can I convert multiple AVIF images to PNG at once?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
Yes, our converter supports batch processing, so you can upload multiple AVIF files and convert them all to PNG in one go.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
Is there an easy way to convert AVIF to PNG online?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
Yes, iformat.io lets you convert AVIF to PNG by uploading your files and downloading the converted PNGs.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
Do I need to install any software to convert AVIF to PNG?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
No, our conversion tool is entirely online, you don't need to download or install any software. Simply upload your file and download the converted PNG.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
Why would I want to convert an AVIF image to PNG?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
PNG is widely supported across all devices, platforms, and applications, making it more accessible for sharing, editing, or uploading than AVIF.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
How long does it take to convert an AVIF file to PNG?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
The conversion process is typically quick and takes just a few seconds, depending on the file size and internet speed.
</p>
</div>
</div>
<div class="faq-item py-4">
<button
class="w-full text-left flex justify-between items-center focus:outline-none hover:bg-blue-50 rounded-lg px-5 py-3"
onclick="toggleFAQ(event)">
<h3 class="text-xl font-medium text-gray-800">
What is the best way to convert AVIF to PNG format?
</h3>
<svg
class="w-6 h-6 text-blue-600 transform transition-transform duration-300"
fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7">
</path>
</svg>
</button>
<div class="faq-answer max-h-0 overflow-hidden transition-all duration-500 ease-in-out px-5 py-0">
<p class="text-lg text-gray-800 py-4 leading-relaxed">
You can convert AVIF to PNG format using iformat.io that supports batch conversions, making the process quick and efficient.
</p>
</div>
</div>
</div>
</div>
<script>
function toggleFAQ(event) {
const button = event.currentTarget;
const answer = button.nextElementSibling;
const svgIcon = button.querySelector('svg');
// Collapse other open answers
document.querySelectorAll('.faq-answer').forEach((el) => {
if (el !== answer) el.style.maxHeight = '0px';
});
document.querySelectorAll('.faq-item svg').forEach((icon) => {
if (icon !== svgIcon) icon.classList.remove('rotate-180');
});
// Toggle current answer
if (answer.style.maxHeight && answer.style.maxHeight !== '0px') {
answer.style.maxHeight = '0px';
} else {
answer.style.maxHeight = answer.scrollHeight + "px";
}
// Rotate the arrow icon
svgIcon.classList.toggle('rotate-180');
}
</script>
<!-- Footer -->
<footer class="bg-white border-t border-gray-200">
<div class="container mx-auto px-6 py-12">
<!-- Grid Layout -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8">
<!-- Brand and Tagline -->
<div class="col-span-1">
<h3 class="text-2xl font-bold text-gray-800">iformat.io</h3>
<p class="mt-4 text-gray-600 text-sm leading-relaxed">
Your ultimate solution for converting, compressing, and managing files—fast, secure, and reliable.
</p>
</div>
<!-- Quick Links -->
<div>
<h4 class="text-lg font-semibold text-gray-800">Quick Links</h4>
<ul class="mt-4 space-y-2">
<li><a href="/about-us" class="text-gray-600 hover:text-gray-900">About Us</a></li>
<li><a href="/all-tools" class="text-gray-600 hover:text-gray-900">All Tools</a></li>
<li><a href="/blog" class="text-gray-600 hover:text-gray-900">Blog</a></li>
</ul>
</div>
<!-- Support -->
<div>
<h4 class="text-lg font-semibold text-gray-800">Support</h4>
<ul class="mt-4 space-y-2">
<li><a href="/contact" class="text-gray-600 hover:text-gray-900">Contact Us</a></li>
<li><a href="/privacy-policy" class="text-gray-600 hover:text-gray-900">Privacy Policy</a></li>
<li><a href="/terms-and-conditions" class="text-gray-600 hover:text-gray-900">Terms of Service</a>
</li>
</ul>
</div>
<!-- Social Media -->
</div>
<!-- Divider and Footer Note -->
<div class="border-t border-gray-300 mt-8 pt-6 text-center">
<p class="text-sm text-gray-500">
© 2023 - 2024 iformat.io. All rights reserved.
</p>
</div>
</div>
</footer>
</body>
</html>